summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcos Munoz2012-11-28 13:32:24 (EST)
committer Roberto Sanchez2012-11-28 13:32:24 (EST)
commita0513be687f42216d30a4e14633760793586f391 (patch)
tree0aa95a43ab7b557bb4dfa1d63b1d2397ad4ce404
parent1d25f53afc6de8c84029d19bbc762afd5dbdbdcb (diff)
downloadwebtools.common-a0513be687f42216d30a4e14633760793586f391.zip
webtools.common-a0513be687f42216d30a4e14633760793586f391.tar.gz
webtools.common-a0513be687f42216d30a4e14633760793586f391.tar.bz2
[393706] Referenced component cannot be removed when the file was removedv201211281900
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentOperation.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentOperation.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentOperation.java
index d0ed549..3704ac7 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentOperation.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentOperation.java
@@ -11,7 +11,9 @@
package org.eclipse.wst.common.componentcore.internal.operation;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IProject;
@@ -49,8 +51,10 @@ public class RemoveReferenceComponentOperation extends AbstractDataModelOperatio
IVirtualComponent sourceComp = (IVirtualComponent) model.getProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT);
if (sourceComp == null || !sourceComp.getProject().isAccessible() || sourceComp.isBinary()) return;
-
- IVirtualReference [] existingReferencesArray = sourceComp.getReferences();
+
+ Map<String, Object> options = new HashMap<String, Object>();
+ options.put(IVirtualComponent.REQUESTED_REFERENCE_TYPE, IVirtualComponent.DISPLAYABLE_REFERENCES_ALL);
+ IVirtualReference [] existingReferencesArray = sourceComp.getReferences(options);
if(existingReferencesArray == null || existingReferencesArray.length == 0){
return;
}