### Eclipse Workspace Patch 1.0 #P org.eclipse.wst.common.modulecore Index: modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java =================================================================== RCS file: /cvsroot/webtools/common/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java,v retrieving revision 1.61 diff -u -r1.61 VirtualComponent.java --- modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java 28 Jan 2008 00:48:17 -0000 1.61 +++ modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java 13 Aug 2008 21:57:26 -0000 @@ -14,6 +14,7 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Properties; import org.eclipse.core.resources.IProject; @@ -267,6 +268,10 @@ } } + public IVirtualReference[] getReferences(Map options) { + return getReferences(); + } + public IVirtualReference[] getReferences() { StructureEdit core = null; List references = new ArrayList(); Index: modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphImpl.java =================================================================== RCS file: /cvsroot/webtools/common/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphImpl.java,v retrieving revision 1.3.2.2 diff -u -r1.3.2.2 DependencyGraphImpl.java --- modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphImpl.java 3 Jul 2008 03:44:00 -0000 1.3.2.2 +++ modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphImpl.java 13 Aug 2008 21:57:26 -0000 @@ -25,6 +25,7 @@ import org.eclipse.wst.common.componentcore.ComponentCore; import org.eclipse.wst.common.componentcore.internal.ModulecorePlugin; import org.eclipse.wst.common.componentcore.internal.impl.WTPModulesResourceFactory; +import org.eclipse.wst.common.componentcore.internal.resources.VirtualComponent; import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; import org.eclipse.wst.common.componentcore.resources.IVirtualReference; @@ -40,9 +41,12 @@ * {A, B} } */ private Map> graph = null; - + private long modStamp = 0; + private Map referenceOptions = new HashMap(); + + /** * This is not public; only {@link IDependencyGraph#INSTANCE} should be * used. @@ -153,6 +157,8 @@ */ private void initGraph() { synchronized (graphLock) { + referenceOptions.put("GET_JAVA_REFS", Boolean.FALSE); + referenceOptions.put("GET_FUZZY_EAR_REFS", Boolean.FALSE); try { preUpdate(); graph = new HashMap>(); @@ -300,7 +306,7 @@ for (IProject sourceProject : allProjects) { IVirtualComponent component = ComponentCore.createComponent(sourceProject); if (component != null) { - IVirtualReference[] references = component.getReferences(); + IVirtualReference[] references = component instanceof VirtualComponent ? ((VirtualComponent)component).getReferences(referenceOptions): component.getReferences(); for (IVirtualReference ref : references) { IVirtualComponent targetComponent = ref.getReferencedComponent(); if (targetComponent != null) { @@ -320,7 +326,7 @@ IVirtualComponent component = ComponentCore.createComponent(sourceProject); if (component != null) { validRefs.clear(); - IVirtualReference[] references = component.getReferences(); + IVirtualReference[] references = component instanceof VirtualComponent ? ((VirtualComponent)component).getReferences(referenceOptions): component.getReferences(); for (IVirtualReference ref : references) { IVirtualComponent targetComponent = ref.getReferencedComponent(); if (targetComponent != null) { #P org.eclipse.jst.j2ee Index: j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java =================================================================== RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java,v retrieving revision 1.11 diff -u -r1.11 J2EEModuleVirtualComponent.java --- j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java 15 May 2008 02:37:47 -0000 1.11 +++ j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java 13 Aug 2008 21:57:27 -0000 @@ -50,6 +50,9 @@ public class J2EEModuleVirtualComponent extends VirtualComponent implements IComponentImplFactory { + public static String GET_JAVA_REFS = "GET_JAVA_REFS"; + public static String GET_FUZZY_EAR_REFS = "GET_FUZZY_EAR_REFS"; + public J2EEModuleVirtualComponent() { super(); } @@ -79,6 +82,15 @@ return getReferences(false, false); } + @Override + public IVirtualReference[] getReferences(Map options) { + Object objGetJavaRefs = options.get(GET_JAVA_REFS); + Object objGetFuzzyEarRefs = options.get(GET_FUZZY_EAR_REFS); + boolean getJavaRefs = objGetJavaRefs != null ? ((Boolean)objGetJavaRefs).booleanValue() : true; + boolean findFuzzyEARRefs = objGetFuzzyEarRefs != null ? ((Boolean)objGetFuzzyEarRefs).booleanValue() : false; + return getReferences(getJavaRefs, findFuzzyEARRefs); + } + public IVirtualReference[] getReferences() { return getReferences(true, false); }