Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradaussy2012-09-06 16:32:51 +0000
committeradaussy2012-09-06 16:32:51 +0000
commit4d85bf9d5c0990efc4796f05292f50f028d02c4c (patch)
treea2e640848c8d1fcc43a81af750f265aa46318f8d
parentb73d947d0561a31ed9157a5af45420c4836ad1ad (diff)
downloadorg.eclipse.papyrus-4d85bf9d5c0990efc4796f05292f50f028d02c4c.tar.gz
org.eclipse.papyrus-4d85bf9d5c0990efc4796f05292f50f028d02c4c.tar.xz
org.eclipse.papyrus-4d85bf9d5c0990efc4796f05292f50f028d02c4c.zip
-rw-r--r--plugins/core/org.eclipse.papyrus.commands/src/org/eclipse/papyrus/commands/DestroyElementPapyrusCommand.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/core/org.eclipse.papyrus.commands/src/org/eclipse/papyrus/commands/DestroyElementPapyrusCommand.java b/plugins/core/org.eclipse.papyrus.commands/src/org/eclipse/papyrus/commands/DestroyElementPapyrusCommand.java
index 0d0da26135d..c1bc6a04e3f 100644
--- a/plugins/core/org.eclipse.papyrus.commands/src/org/eclipse/papyrus/commands/DestroyElementPapyrusCommand.java
+++ b/plugins/core/org.eclipse.papyrus.commands/src/org/eclipse/papyrus/commands/DestroyElementPapyrusCommand.java
@@ -39,6 +39,11 @@ public class DestroyElementPapyrusCommand extends DestroyElementCommand {
public DestroyElementPapyrusCommand(DestroyElementRequest request) {
super(request);
+
+ /*
+ * Quick fixe : Waiting for the patch to be approved by GMF Runtime team
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=386999
+ */
getAffectedFiles().addAll(fileOfIncomingReferences(request.getElementToDestroy()));
}
@@ -53,10 +58,13 @@ public class DestroyElementPapyrusCommand extends DestroyElementCommand {
List<Object> result =new ArrayList<Object>();
for(Setting setting : usages) {
EReference eRef = (EReference)setting.getEStructuralFeature();
- if(eRef.isChangeable() && (eRef.isDerived() == false) && (eRef.isContainment() == false) && (eRef.isContainer() == false)) {
- List files = getWorkspaceFiles(setting.getEObject());
- if (files != null){
- result.addAll(files);
+ if(eRef.isChangeable() && (eRef.isDerived() == false) && (eRef.isContainment() == false) && (eRef.isContainer() == false) && eRef.isTransient() == false) {
+ EObject eObject = setting.getEObject();
+ if (isSerialized(eObject)){
+ List files = getWorkspaceFiles(eObject);
+ if (files != null){
+ result.addAll(files);
+ }
}
}
}

Back to the top