[232335] get 229650 into 30
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEFlexProjDeployable.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEFlexProjDeployable.java index bfa8958..d62ecf3 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEFlexProjDeployable.java +++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEFlexProjDeployable.java
@@ -18,6 +18,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Properties; import java.util.Set; @@ -58,6 +59,7 @@ import org.eclipse.wst.common.componentcore.ArtifactEdit; import org.eclipse.wst.common.componentcore.ComponentCore; import org.eclipse.wst.common.componentcore.internal.ComponentResource; +import org.eclipse.wst.common.componentcore.internal.Property; import org.eclipse.wst.common.componentcore.internal.StructureEdit; import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent; import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent; @@ -81,6 +83,7 @@ protected static final IPath WEB_CLASSES_PATH = new Path(J2EEConstants.WEB_INF_CLASSES); protected static final IPath MANIFEST_PATH = new Path(J2EEConstants.MANIFEST_URI); protected static IPath WEBLIB = new Path(J2EEConstants.WEB_INF_LIB).makeAbsolute(); + private static String USE_SINGLE_ROOT_PROPERTY = "useSingleRoot"; //$NON-NLS-1$ protected IPackageFragmentRoot[] cachedSourceContainers; protected IContainer[] cachedOutputContainers; protected HashMap cachedOutputMappings; @@ -824,6 +827,22 @@ WorkbenchComponent wbComp = edit.getComponent(); List resourceMaps = wbComp.getResources(); + // 229650 - check to see if the property 'useSingleRoot' is defined. If it is set and + // the value of the property is true then it will override the logic checks below + final List componentProperties = wbComp.getProperties(); + if (componentProperties != null) { + final Iterator componentPropertiesIterator = componentProperties.iterator(); + while (componentPropertiesIterator.hasNext()) { + Property wbProperty = (Property) componentPropertiesIterator.next(); + if (J2EEFlexProjDeployable.USE_SINGLE_ROOT_PROPERTY.equals(wbProperty.getName())) { + boolean useSingleRoot = Boolean.valueOf(wbProperty.getValue()).booleanValue(); + if (useSingleRoot) { + return true; + } + } + } + } + if (J2EEProjectUtilities.isEARProject(getProject())) { // Always return false for EARs so that members for EAR are always calculated and j2ee modules // are filtered out