summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-08-05 02:43:32 (EDT)
committerLaurent Wouters2014-08-05 02:43:32 (EDT)
commit52e1dfc0e733bd156218743ae046adfcaeb85600 (patch)
treefde626bbd980ff43e2190d874b455bed02f8dcb2
parentfdb449c79a0f4d1ff1e0c4e59aa00440ce10efe8 (diff)
downloadorg.eclipse.papyrus-52e1dfc0e733bd156218743ae046adfcaeb85600.zip
org.eclipse.papyrus-52e1dfc0e733bd156218743ae046adfcaeb85600.tar.gz
org.eclipse.papyrus-52e1dfc0e733bd156218743ae046adfcaeb85600.tar.bz2
Bug 441087: [ModelExplorer] Drop diagrams from model explorer (Graphical Move) cannot be undonerefs/changes/12/31012/1
Fixed the change owner and change root commands for the diagrams and tables that were errorneous Change-Id: I95d97c15934ec4b76b0255d2bf6bd05e50bdfe3d Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java12
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java12
2 files changed, 20 insertions, 4 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
index e28a4ea..3c8632a 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
@@ -82,10 +82,14 @@ public class DiagramPrototype extends ViewPrototype {
DiagramUtils.setOwner(diagram, target);
}
@Override
- public void redo() {
+ public void undo() {
DiagramUtils.setOwner(diagram, previous);
}
@Override
+ public void redo() {
+ DiagramUtils.setOwner(diagram, target);
+ }
+ @Override
protected boolean prepare() { return true; }
};
}
@@ -100,10 +104,14 @@ public class DiagramPrototype extends ViewPrototype {
diagram.setElement(target);
}
@Override
- public void redo() {
+ public void undo() {
diagram.setElement(previous);
}
@Override
+ public void redo() {
+ diagram.setElement(target);
+ }
+ @Override
protected boolean prepare() { return true; }
};
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java
index 739ed4b..9ec56e8 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java
@@ -69,10 +69,14 @@ public class TableViewPrototype extends ViewPrototype {
table.setOwner(target);
}
@Override
- public void redo() {
+ public void undo() {
table.setOwner(previous);
}
@Override
+ public void redo() {
+ table.setOwner(target);
+ }
+ @Override
protected boolean prepare() { return true; }
};
}
@@ -87,10 +91,14 @@ public class TableViewPrototype extends ViewPrototype {
table.setContext(target);
}
@Override
- public void redo() {
+ public void undo() {
table.setContext(previous);
}
@Override
+ public void redo() {
+ table.setContext(target);
+ }
+ @Override
protected boolean prepare() { return true; }
};
}