[309186] [API] FlatVirtualComponent should ignore manifest references
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/FlatVirtualComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/FlatVirtualComponent.java
index 1802a7b..09829f1 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/FlatVirtualComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/FlatVirtualComponent.java
@@ -14,6 +14,7 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
@@ -186,7 +187,9 @@
 	 */
 	protected void addConsumedReferences(VirtualComponentFlattenUtility util, IVirtualComponent vc, IPath root) throws CoreException {
 		List consumableMembers = new ArrayList();
-		IVirtualReference[] refComponents = vc.getReferences();
+		Map<String, Object> options = new HashMap<String, Object>();
+		options.put(IVirtualComponent.REQUESTED_REFERENCE_TYPE, IVirtualComponent.FLATTENABLE_REFERENCES);
+		IVirtualReference[] refComponents = vc.getReferences(options);
     	for (int i = 0; i < refComponents.length; i++) {
     		IVirtualReference reference = refComponents[i];
     		if (reference != null && reference.getDependencyType()==IVirtualReference.DEPENDENCY_TYPE_CONSUMES) {
@@ -218,7 +221,9 @@
 	}
 
 	protected void addUsedReferences(VirtualComponentFlattenUtility util, IVirtualComponent vc, IPath root) throws CoreException {
-		IVirtualReference[] allReferences = vc.getReferences();
+		Map<String, Object> options = new HashMap<String, Object>();
+		options.put(IVirtualComponent.REQUESTED_REFERENCE_TYPE, IVirtualComponent.FLATTENABLE_REFERENCES);
+		IVirtualReference[] allReferences = vc.getReferences(options);
     	for (int i = 0; i < allReferences.length; i++) {
     		IVirtualReference reference = allReferences[i];
 			IVirtualComponent virtualComp = reference.getReferencedComponent();
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java
index ed87e24..69a1b5a 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java
@@ -44,6 +44,7 @@
 	public static final String HARD_REFERENCES = "HARD_REFERENCES";
 	public static final String NON_DERIVED_REFERENCES = "NON_DERIVED_REFERENCES";
 	public static final String DISPLAYABLE_REFERENCES = "DISPLAYABLE_REFERENCES";
+	public static final String FLATTENABLE_REFERENCES = "FLATTENABLE_REFERENCES";
 		
 	/**
 	 * The name of the component must be unique within its enclosing project.