Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/SelectConnectorHandler.java')
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/SelectConnectorHandler.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/SelectConnectorHandler.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/SelectConnectorHandler.java
index 32ac722e455..0e287da61f6 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/SelectConnectorHandler.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/SelectConnectorHandler.java
@@ -1,8 +1,8 @@
/*******************************************************************************
* All rights reserved. This program and the accompanying materials
- * are property of the CEA, their use is subject to specific agreement
+ * are property of the CEA, their use is subject to specific agreement
* with the CEA.
- *
+ *
* Contributors:
* CEA LIST - initial API and implementation
*******************************************************************************/
@@ -35,7 +35,7 @@ public class SelectConnectorHandler extends CmdHandler {
@Override
public boolean isEnabled() {
updateSelectedEObject();
- if((selectedEObject instanceof Connector) || (selectedEObject instanceof Property)) {
+ if ((selectedEObject instanceof Connector) || (selectedEObject instanceof Property)) {
return true;
}
return false;
@@ -46,13 +46,14 @@ public class SelectConnectorHandler extends CmdHandler {
*
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
// feature is a common superclass of Connector and Property
- if(!(selectedEObject instanceof Feature)) {
+ if (!(selectedEObject instanceof Feature)) {
return null;
}
// get selected connector
- final Feature selectedFeature = (Feature)selectedEObject;
+ final Feature selectedFeature = (Feature) selectedEObject;
Shell shell = new Shell();
// 1. select possible connectors according to port types
@@ -62,18 +63,19 @@ public class SelectConnectorHandler extends CmdHandler {
Model model = selectedFeature.getModel();
ConnectorSelectionDialog elementSelector =
- new ConnectorSelectionDialog(shell, model, selectedFeature);
+ new ConnectorSelectionDialog(shell, model, selectedFeature);
elementSelector.setTitle("Select connector");
elementSelector.setMessage("Select an implementation for connector " + selectedFeature.getName());
elementSelector.open();
- if(elementSelector.getReturnCode() == IDialogConstants.OK_ID) {
+ if (elementSelector.getReturnCode() == IDialogConstants.OK_ID) {
final Object[] result = elementSelector.getResult();
- if((result.length == 1) && (result[0] instanceof Class)) {
+ if ((result.length == 1) && (result[0] instanceof Class)) {
CommandSupport.exec("Select connector", event, new Runnable() {
+ @Override
public void run() {
org.eclipse.papyrus.FCM.Connector fcmSelectedConnector = StereotypeUtil.applyApp(selectedFeature, org.eclipse.papyrus.FCM.Connector.class);
- InteractionComponent newConnType = UMLUtil.getStereotypeApplication((Class)result[0], InteractionComponent.class);
+ InteractionComponent newConnType = UMLUtil.getStereotypeApplication((Class) result[0], InteractionComponent.class);
fcmSelectedConnector.setIc(newConnType);
}
});

Back to the top