Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-10-10 06:20:02 -0400
committerHenrik Rentz-Reichert2012-10-10 06:20:02 -0400
commit0ca49a573800ac2a025504e4095fd707ec0d4449 (patch)
tree88444f0f3715ef3428d3f0fd90b4a15eabf7963b /plugins/org.eclipse.etrice.ui.structure
parent9462d7eb7721318e2ddd4a3a16410f2c5b108324 (diff)
downloadorg.eclipse.etrice-0ca49a573800ac2a025504e4095fd707ec0d4449.tar.gz
org.eclipse.etrice-0ca49a573800ac2a025504e4095fd707ec0d4449.tar.xz
org.eclipse.etrice-0ca49a573800ac2a025504e4095fd707ec0d4449.zip
[ui.structure, ui.behavior] various fixes
- dispatching from transition labels - abortion of commands - handling of refined states and transitions
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/BindingSupport.java11
-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
4 files changed, 12 insertions, 8 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 5e969ebb1..bae821e7f 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,7 +14,6 @@ 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;
@@ -372,7 +371,7 @@ public class ActorContainerRefSupport {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
ActorContainerRefPropertyDialog dlg = new ActorContainerRefPropertyDialog(shell, acr, scope, sc, false);
if (dlg.open()!=Window.OK)
- throw new OperationCanceledException();
+ return;
doneChanges = true;
//updateLabel(acr, context.getPictogramElements()[0]);
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
index 15630c85c..96d4d52d5 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
@@ -12,7 +12,6 @@
package org.eclipse.etrice.ui.structure.support;
-import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.etrice.core.naming.RoomNameProvider;
@@ -88,6 +87,8 @@ public class BindingSupport {
private class CreateFeature extends AbstractCreateConnectionFeature {
+ private boolean doneChanges = false;
+
public CreateFeature(IFeatureProvider fp) {
super(fp, "Binding", "create Binding");
}
@@ -168,7 +169,7 @@ public class BindingSupport {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
SubProtocolSelectionDialog dlg = new SubProtocolSelectionDialog(shell, src, ar1, dst, ar2, null, sc);
if (dlg.open()!=Window.OK)
- throw new OperationCanceledException();
+ return null;
ep1.setSub(dlg.getSelected().getLeft());
ep2.setSub(dlg.getSelected().getRight());
@@ -179,6 +180,7 @@ public class BindingSupport {
AddConnectionContext addContext = new AddConnectionContext(context.getSourceAnchor(), context.getTargetAnchor());
addContext.setNewObject(bind);
newConnection = (Connection) featureProvider.addIfPossible(addContext);
+ doneChanges = true;
}
return newConnection;
@@ -236,6 +238,11 @@ public class BindingSupport {
DecorationProvider.clearAllowedPortShapes();
getDiagramEditor().refresh();
}
+
+ @Override
+ public boolean hasDoneChanges() {
+ return doneChanges;
+ }
}
private class AddFeature extends AbstractAddFeature {
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 f8a0b5d44..9db2441da 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
@@ -15,7 +15,6 @@ package org.eclipse.etrice.ui.structure.support;
import java.util.ArrayList;
import java.util.Collection;
-import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.emf.ecore.util.EcoreUtil;
@@ -216,7 +215,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)
- throw new OperationCanceledException();
+ return;
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 13c5ac35f..f95d69f70 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
@@ -15,7 +15,6 @@ package org.eclipse.etrice.ui.structure.support;
import java.util.ArrayList;
import java.util.Collection;
-import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.emf.ecore.util.EcoreUtil;
@@ -180,7 +179,7 @@ public class SPPSupport extends InterfaceItemSupport {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
SPPPropertyDialog dlg = new SPPPropertyDialog(shell, spp, scope, false, refport);
if (dlg.open()!=Window.OK)
- throw new OperationCanceledException();
+ return;
doneChanges = true;
updateSPPFigure(spp, context.getPictogramElements()[0], manageColor(DARK_COLOR), manageColor(BRIGHT_COLOR));

Back to the top