Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvbhadrir2006-02-16 18:17:59 +0000
committervbhadrir2006-02-16 18:17:59 +0000
commitb57b2b5572a03adc9fd7662946164d185a06313a (patch)
treee26b517a2591e287600bd46bcb994e5b1203da6b /plugins
parent1eabfb56a3387dae8790e229d37396a904d8e1e5 (diff)
downloadwebtools.common-b57b2b5572a03adc9fd7662946164d185a06313a.tar.gz
webtools.common-b57b2b5572a03adc9fd7662946164d185a06313a.tar.xz
webtools.common-b57b2b5572a03adc9fd7662946164d185a06313a.zip
[128118] commited for NA
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsOp.java6
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java6
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsOp.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsOp.java
index 25210f1c1..51d23b170 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsOp.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsOp.java
@@ -80,8 +80,10 @@ public class CreateReferenceComponentsOp extends AbstractDataModelOperation {
private boolean srcComponentContainsReference(IVirtualComponent sourceComp, IVirtualComponent comp) {
IVirtualReference[] existingReferences = sourceComp.getReferences();
for (int i = 0; i < existingReferences.length; i++) {
- if(existingReferences[i].getReferencedComponent().getProject().equals(comp.getProject())){
- return true;
+ if( existingReferences[i].getReferencedComponent() != null ){
+ if(existingReferences[i].getReferencedComponent().getProject().equals(comp.getProject())){
+ return true;
+ }
}
}
return false;
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
index 519960fd3..95e22aecf 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
@@ -389,8 +389,10 @@ public class VirtualComponent implements IVirtualComponent {
IVirtualReference[] refs = getReferences();
for (int i = 0; i < refs.length; i++) {
IVirtualReference reference = refs[i];
- if (reference.getReferencedComponent().getName().equals(aComponentName))
- return reference;
+ if( reference.getReferencedComponent() != null ){
+ if (reference.getReferencedComponent().getName().equals(aComponentName))
+ return reference;
+ }
}
return null;
}

Back to the top