[365138] Folder for deployment descriptor field does not display the correct options when there are two or more mappings containing a DD
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html b/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html index e4d8eca..f3e9f21 100644 --- a/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html +++ b/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html
@@ -15,6 +15,7 @@ <p>Bug <a href='https://bugs.eclipse.org/364086'>364086</a>. EJB Project wizard doesn't show up and shows an error</p> <p>Bug <a href='https://bugs.eclipse.org/365135'>365135</a>. [modulecore] Behavior when multiple src dirs are mapped to component root</p> +<p>Bug <a href='https://bugs.eclipse.org/365138'>365138</a>. Folder for deployment descriptor field does not display the correct options when there are two or more mappings containing a DD</p> </body> </html> \ No newline at end of file
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties b/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties index 0468c87..67cc2ac 100644 --- a/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties +++ b/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties
@@ -30,6 +30,7 @@ \n\ Bug https://bugs.eclipse.org/364086 EJB Project wizard doesn't show up and shows an error\n\ Bug https://bugs.eclipse.org/365135 [modulecore] Behavior when multiple src dirs are mapped to component root\n\ +Bug https://bugs.eclipse.org/365138 Folder for deployment descriptor field does not display the correct options when there are two or more mappings containing a DD\n\ \n\ # "copyright" property - text of the "Feature Update Copyright"
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEDeploymentAssemblyAdvancedSectionBuilder.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEDeploymentAssemblyAdvancedSectionBuilder.java index 02f62c3..e1026e7 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEDeploymentAssemblyAdvancedSectionBuilder.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEDeploymentAssemblyAdvancedSectionBuilder.java
@@ -171,8 +171,7 @@ if (fileToLook != null && !fileToLook.equals("")){ //$NON-NLS-1$ IFile ddFile = project.getFile(new Path(mapping).addTrailingSeparator() + fileToLook); if (ddFile != null && ddFile.exists()){ - mappingWithDD.add(mapping); - return new ArrayList<String>(mappingWithDD); + mappingWithDD.add(mapping); } } if (folderToLook != null && !folderToLook.equals("")){ //$NON-NLS-1$ @@ -182,6 +181,10 @@ } } } + if (!mappingWithDD.isEmpty()){ + // return only the mappings that contain a DD file. + return new ArrayList<String>(mappingWithDD); + } return new ArrayList<String>(mappingWithFolder); }