Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-12-02 05:13:47 -0500
committerHenrik Rentz-Reichert2011-12-02 05:13:47 -0500
commit5d079b4fa717cbfb05adfb072d6aad44e3341202 (patch)
tree67cfddf0bae2054348d0452ce5a42ef6bdb4a737 /plugins/org.eclipse.etrice.ui.structure
parent77a3c1ee9546c5b3d150999b46e4f3c35b50c95f (diff)
downloadorg.eclipse.etrice-5d079b4fa717cbfb05adfb072d6aad44e3341202.tar.gz
org.eclipse.etrice-5d079b4fa717cbfb05adfb072d6aad44e3341202.tar.xz
org.eclipse.etrice-5d079b4fa717cbfb05adfb072d6aad44e3341202.zip
[ui.structure, ui.behavior] roll-back changes when property dialogs are canceled
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.structure')
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java3
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java3
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java3
3 files changed, 6 insertions, 3 deletions
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java
index f6ef23b07..b46f3f3b5 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java
@@ -14,6 +14,7 @@ package org.eclipse.etrice.ui.structure.support;
import java.util.List;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
@@ -390,7 +391,7 @@ public class ActorContainerRefSupport {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
ActorContainerRefPropertyDialog dlg = new ActorContainerRefPropertyDialog(shell, acr, scope, sc, false);
if (dlg.open()!=Window.OK)
- return;
+ throw new OperationCanceledException();
doneChanges = true;
updateLabel(acr, context.getPictogramElements()[0]);
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java
index 3a4f7d627..10d3756e8 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java
@@ -12,6 +12,7 @@
package org.eclipse.etrice.ui.structure.support;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.etrice.core.validation.ValidationUtil;
import org.eclipse.etrice.ui.structure.DiagramTypeProvider;
import org.eclipse.etrice.ui.structure.ImageProvider;
@@ -203,7 +204,7 @@ public class PortSupport extends InterfaceItemSupport {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
PortPropertyDialog dlg = new PortPropertyDialog(shell, port, scope, acc, false, refport, internal);
if (dlg.open()!=Window.OK)
- return;
+ throw new OperationCanceledException();
doneChanges = true;
updatePortFigure(port, context.getPictogramElements()[0], manageColor(DARK_COLOR), manageColor(BRIGHT_COLOR));
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java
index 04da16dc7..3e0eee395 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/SPPSupport.java
@@ -12,6 +12,7 @@
package org.eclipse.etrice.ui.structure.support;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.etrice.core.validation.ValidationUtil;
import org.eclipse.etrice.ui.common.support.NoResizeFeature;
import org.eclipse.etrice.ui.structure.DiagramTypeProvider;
@@ -165,7 +166,7 @@ public class SPPSupport extends InterfaceItemSupport {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
SPPPropertyDialog dlg = new SPPPropertyDialog(shell, spp, scope, acc, false, refport);
if (dlg.open()!=Window.OK)
- return;
+ throw new OperationCanceledException();
doneChanges = true;
updateSPPFigure(spp, context.getPictogramElements()[0], manageColor(DARK_COLOR), manageColor(BRIGHT_COLOR));

Back to the top