View | Details | Raw Unified | Return to bug 244086 | Differences between
and this patch

Collapse All | Expand All

(-)modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java (+5 lines)
Lines 14-19 Link Here
14
import java.util.Enumeration;
14
import java.util.Enumeration;
15
import java.util.Iterator;
15
import java.util.Iterator;
16
import java.util.List;
16
import java.util.List;
17
import java.util.Map;
17
import java.util.Properties;
18
import java.util.Properties;
18
19
19
import org.eclipse.core.resources.IProject;
20
import org.eclipse.core.resources.IProject;
Lines 267-272 Link Here
267
		}
268
		}
268
	}	
269
	}	
269
270
271
	public IVirtualReference[] getReferences(Map<String, Object> options) {
272
		return getReferences();
273
	}
274
	
270
	public IVirtualReference[] getReferences() { 
275
	public IVirtualReference[] getReferences() { 
271
		StructureEdit core = null;
276
		StructureEdit core = null;
272
		List references = new ArrayList();
277
		List references = new ArrayList();
(-)modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphImpl.java (-3 / +9 lines)
Lines 25-30 Link Here
25
import org.eclipse.wst.common.componentcore.ComponentCore;
25
import org.eclipse.wst.common.componentcore.ComponentCore;
26
import org.eclipse.wst.common.componentcore.internal.ModulecorePlugin;
26
import org.eclipse.wst.common.componentcore.internal.ModulecorePlugin;
27
import org.eclipse.wst.common.componentcore.internal.impl.WTPModulesResourceFactory;
27
import org.eclipse.wst.common.componentcore.internal.impl.WTPModulesResourceFactory;
28
import org.eclipse.wst.common.componentcore.internal.resources.VirtualComponent;
28
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
29
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
29
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
30
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
30
31
Lines 40-48 Link Here
40
	 * {A, B} }
41
	 * {A, B} }
41
	 */
42
	 */
42
	private Map<IProject, Set<IProject>> graph = null;
43
	private Map<IProject, Set<IProject>> graph = null;
43
44
	
44
	private long modStamp = 0;
45
	private long modStamp = 0;
45
46
47
	private Map<String, Object> referenceOptions = new HashMap<String, Object>();
48
	
49
	
46
	/**
50
	/**
47
	 * This is not public; only {@link IDependencyGraph#INSTANCE} should be
51
	 * This is not public; only {@link IDependencyGraph#INSTANCE} should be
48
	 * used.
52
	 * used.
Lines 153-158 Link Here
153
	 */
157
	 */
154
	private void initGraph() {
158
	private void initGraph() {
155
		synchronized (graphLock) {
159
		synchronized (graphLock) {
160
			referenceOptions.put("GET_JAVA_REFS", Boolean.FALSE);
161
			referenceOptions.put("GET_FUZZY_EAR_REFS", Boolean.FALSE);
156
			try {
162
			try {
157
				preUpdate();
163
				preUpdate();
158
				graph = new HashMap<IProject, Set<IProject>>();
164
				graph = new HashMap<IProject, Set<IProject>>();
Lines 300-306 Link Here
300
						for (IProject sourceProject : allProjects) {
306
						for (IProject sourceProject : allProjects) {
301
							IVirtualComponent component = ComponentCore.createComponent(sourceProject);
307
							IVirtualComponent component = ComponentCore.createComponent(sourceProject);
302
							if (component != null) {
308
							if (component != null) {
303
								IVirtualReference[] references = component.getReferences();
309
								IVirtualReference[] references = ((VirtualComponent)component).getReferences(referenceOptions);
304
								for (IVirtualReference ref : references) {
310
								for (IVirtualReference ref : references) {
305
									IVirtualComponent targetComponent = ref.getReferencedComponent();
311
									IVirtualComponent targetComponent = ref.getReferencedComponent();
306
									if (targetComponent != null) {
312
									if (targetComponent != null) {
Lines 320-326 Link Here
320
							IVirtualComponent component = ComponentCore.createComponent(sourceProject);
326
							IVirtualComponent component = ComponentCore.createComponent(sourceProject);
321
							if (component != null) {
327
							if (component != null) {
322
								validRefs.clear();
328
								validRefs.clear();
323
								IVirtualReference[] references = component.getReferences();
329
								IVirtualReference[] references = ((VirtualComponent)component).getReferences(referenceOptions);
324
								for (IVirtualReference ref : references) {
330
								for (IVirtualReference ref : references) {
325
									IVirtualComponent targetComponent = ref.getReferencedComponent();
331
									IVirtualComponent targetComponent = ref.getReferencedComponent();
326
									if (targetComponent != null) {
332
									if (targetComponent != null) {
(-)j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java (+12 lines)
Lines 50-55 Link Here
50
50
51
public class J2EEModuleVirtualComponent extends VirtualComponent implements IComponentImplFactory {
51
public class J2EEModuleVirtualComponent extends VirtualComponent implements IComponentImplFactory {
52
52
53
	public static String GET_JAVA_REFS = "GET_JAVA_REFS";
54
	public static String GET_FUZZY_EAR_REFS = "GET_FUZZY_EAR_REFS";
55
	
53
	public J2EEModuleVirtualComponent() {
56
	public J2EEModuleVirtualComponent() {
54
		super();
57
		super();
55
	}
58
	}
Lines 79-84 Link Here
79
		return getReferences(false, false);
82
		return getReferences(false, false);
80
	}
83
	}
81
	
84
	
85
	@Override
86
	public IVirtualReference[] getReferences(Map<String, Object> options) {
87
		Object objGetJavaRefs = options.get(GET_JAVA_REFS);
88
		Object objGetFuzzyEarRefs = options.get(GET_FUZZY_EAR_REFS);
89
		boolean getJavaRefs = objGetJavaRefs != null ? ((Boolean)objGetJavaRefs).booleanValue() : true;
90
		boolean findFuzzyEARRefs = objGetFuzzyEarRefs != null ? ((Boolean)objGetFuzzyEarRefs).booleanValue() : false;
91
		return getReferences(getJavaRefs, findFuzzyEARRefs);
92
	}
93
	
82
	public IVirtualReference[] getReferences() {
94
	public IVirtualReference[] getReferences() {
83
		return getReferences(true, false);
95
		return getReferences(true, false);
84
	}
96
	}

Return to bug 244086