Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauline DEVILLE2017-01-19 16:22:38 +0000
committerFlorian Noyrit2017-04-19 09:23:53 +0000
commitfcda1bb72367ca6cd467cb62d617a009fd8f8383 (patch)
tree43c963b37f738ba8b88935a62144997657560ea0 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus
parente3a93b499e1ff6b4ae925a83a33be67741362e95 (diff)
downloadorg.eclipse.papyrus-fcda1bb72367ca6cd467cb62d617a009fd8f8383.tar.gz
org.eclipse.papyrus-fcda1bb72367ca6cd467cb62d617a009fd8f8383.tar.xz
org.eclipse.papyrus-fcda1bb72367ca6cd467cb62d617a009fd8f8383.zip
Bug 509160 - [ActivityDiagram] Pins of CreateLinkAction should be create
and update automatically Change-Id: Iee441a24ccd11cc93afb3d3d16cda6cec7e856dd Signed-off-by: Pauline DEVILLE <pauline.deville@cea.fr>
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/CreateLinkActionEditHelperAdvice.java85
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/LinkEndCreationDataEditHelperAdvice.java85
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/PropertyEditHelperAdvice.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/util/PinUpdateLinkEndDataCommand.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/IPinUpdaterLinkEndData.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/PinUpdaterFactory.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/CreateLinkActionPinUpdater.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkActionPinUpdater.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkEndCreationDataPinUpdater.java82
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkEndDataCommonPinUpdater.java52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/ActivityAutomatedModelCompletionPreferencePage.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/AutomatedModelCompletionPreferencesInitializer.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/IAutomatedModelCompletionPreferencesConstants.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/listeners/ObjectNodeListener.java2
14 files changed, 589 insertions, 1 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/CreateLinkActionEditHelperAdvice.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/CreateLinkActionEditHelperAdvice.java
new file mode 100644
index 00000000000..4414bba1e71
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/CreateLinkActionEditHelperAdvice.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.advices;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.uml.diagram.activity.edit.commands.util.PinUpdateCommand;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdater;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.PinUpdaterFactory;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.preferences.AutomatedModelCompletionPreferencesInitializer;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.preferences.IAutomatedModelCompletionPreferencesConstants;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.uml2.uml.CreateLinkAction;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * Pins of CreateLinkAction should be create and update automatically
+ *
+ */
+public class CreateLinkActionEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected ICommand getAfterConfigureCommand(ConfigureRequest request) {
+ // 1] get the preference for CreateLinkAction
+ final IPreferenceStore prefStore = Activator.getDefault().getPreferenceStore();
+ boolean synchronizePin = (prefStore.getString(IAutomatedModelCompletionPreferencesConstants.CREATE_LINK_ACTION_ACCELERATOR).equals(AutomatedModelCompletionPreferencesInitializer.PIN_SYNCHRONIZATION));
+ // 2] check preference
+ if (synchronizePin) {
+ CreateLinkAction editedModelElement = (CreateLinkAction) request.getElementToConfigure();
+ if (editedModelElement != null) {
+ // 3] call the command for the CreateLinkAction
+ IPinUpdater<CreateLinkAction> updater = PinUpdaterFactory.getInstance().instantiate(editedModelElement);
+ return new PinUpdateCommand<CreateLinkAction>("Update create link action pins", updater, editedModelElement); //$NON-NLS-1$
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected ICommand getAfterSetCommand(SetRequest request) {
+ // 1] check if the setFeature is endData
+ if (request.getFeature().equals(UMLPackage.eINSTANCE.getLinkAction_EndData())) {
+ // 2] get the preference for CreateLinkAction
+ final IPreferenceStore prefStore = Activator.getDefault().getPreferenceStore();
+ boolean synchronizePin = (prefStore.getString(IAutomatedModelCompletionPreferencesConstants.CREATE_LINK_ACTION_ACCELERATOR).equals(AutomatedModelCompletionPreferencesInitializer.PIN_SYNCHRONIZATION));
+ // 3] check preference
+ if (synchronizePin) {
+ CreateLinkAction editedModelElement = (CreateLinkAction) request.getElementToEdit();
+ if (editedModelElement != null) {
+ // 4] call the command for the CreateLinkAction
+ IPinUpdater<CreateLinkAction> updater = PinUpdaterFactory.getInstance().instantiate(editedModelElement);
+ return new PinUpdateCommand<CreateLinkAction>("Update create link action pins", updater, editedModelElement); //$NON-NLS-1$
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/LinkEndCreationDataEditHelperAdvice.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/LinkEndCreationDataEditHelperAdvice.java
new file mode 100644
index 00000000000..a676f907247
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/LinkEndCreationDataEditHelperAdvice.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.advices;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.uml.diagram.activity.edit.commands.util.PinUpdateLinkEndDataCommand;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdaterLinkEndData;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.LinkEndCreationDataPinUpdater;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.preferences.AutomatedModelCompletionPreferencesInitializer;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.preferences.IAutomatedModelCompletionPreferencesConstants;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.uml2.uml.LinkEndCreationData;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * Pins of CreateLinkAction should be create and update automatically
+ *
+ */
+public class LinkEndCreationDataEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected ICommand getAfterConfigureCommand(ConfigureRequest request) {
+ // 1] get the preference for CreateLinkAction
+ final IPreferenceStore prefStore = Activator.getDefault().getPreferenceStore();
+ boolean synchronizePin = (prefStore.getString(IAutomatedModelCompletionPreferencesConstants.CREATE_LINK_ACTION_ACCELERATOR).equals(AutomatedModelCompletionPreferencesInitializer.PIN_SYNCHRONIZATION));
+ // 2] check preference
+ if (synchronizePin) {
+ LinkEndCreationData editedModelElement = (LinkEndCreationData) request.getElementToConfigure();
+ if (editedModelElement != null) {
+ // 3] call the command for the LinkEndCreationData
+ IPinUpdaterLinkEndData updater = new LinkEndCreationDataPinUpdater();
+ return new PinUpdateLinkEndDataCommand("Update link end data pins", updater, editedModelElement); //$NON-NLS-1$
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected ICommand getAfterSetCommand(SetRequest request) {
+ // 1] check if the setFeature is end
+ if (request.getFeature().equals(UMLPackage.eINSTANCE.getLinkEndData_End())) {
+ // 2] get the preference for CreateLinkAction
+ final IPreferenceStore prefStore = Activator.getDefault().getPreferenceStore();
+ boolean synchronizePin = (prefStore.getString(IAutomatedModelCompletionPreferencesConstants.CREATE_LINK_ACTION_ACCELERATOR).equals(AutomatedModelCompletionPreferencesInitializer.PIN_SYNCHRONIZATION));
+ // 3] check preference
+ if (synchronizePin) {
+ LinkEndCreationData editedModelElement = (LinkEndCreationData) request.getElementToEdit();
+ if (editedModelElement != null) {
+ // 4] call the command for the LinkEndCreationData
+ IPinUpdaterLinkEndData updater = new LinkEndCreationDataPinUpdater();
+ return new PinUpdateLinkEndDataCommand("Update link end data pins", updater, editedModelElement); //$NON-NLS-1$
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/PropertyEditHelperAdvice.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/PropertyEditHelperAdvice.java
index 4f19104881b..c84375e9fbb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/PropertyEditHelperAdvice.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/advices/PropertyEditHelperAdvice.java
@@ -21,8 +21,11 @@ import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.uml.diagram.activity.edit.commands.util.PinUpdateCommand;
+import org.eclipse.papyrus.uml.diagram.activity.edit.commands.util.PinUpdateLinkEndDataCommand;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdater;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdaterLinkEndData;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.PinUpdaterFactory;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.LinkEndCreationDataPinUpdater;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.preferences.AutomatedModelCompletionPreferencesInitializer;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.preferences.IAutomatedModelCompletionPreferencesConstants;
import org.eclipse.papyrus.uml.diagram.common.Activator;
@@ -31,6 +34,7 @@ import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
import org.eclipse.uml2.uml.AcceptCallAction;
import org.eclipse.uml2.uml.AcceptEventAction;
import org.eclipse.uml2.uml.AddStructuralFeatureValueAction;
+import org.eclipse.uml2.uml.LinkEndCreationData;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.ReadStructuralFeatureAction;
@@ -87,6 +91,22 @@ public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice {
}
}
}
+ // Pins of CreateLinkAction should be create and update automatically
+ // 1] get the preference for CreateLinkAction
+ synchronizePinPreference = (prefStore.getString(IAutomatedModelCompletionPreferencesConstants.CREATE_LINK_ACTION_ACCELERATOR).equals(AutomatedModelCompletionPreferencesInitializer.PIN_SYNCHRONIZATION));
+ // 2] check preference
+ if (synchronizePinPreference) {
+ // 3] get all LinkEndCreationData
+ List<LinkEndCreationData> allLinkEndCreationData = ElementUtil.getInstancesFilteredByType(root, LinkEndCreationData.class, null);
+ // 4] loop into the list of LinkEndCreationData
+ for (LinkEndCreationData linkEndCreationData : allLinkEndCreationData) {
+ if (linkEndCreationData.getEnd() == property) {
+ // 5] call the command for the CreateLinkAction owning the LinkEndCreationData
+ IPinUpdaterLinkEndData updater = new LinkEndCreationDataPinUpdater();
+ command.add(new PinUpdateLinkEndDataCommand("Update link end data pins", updater, linkEndCreationData)); //$NON-NLS-1$
+ }
+ }
+ }
// check if the setFeature is not Name (only type and multiplicity is interesting)
if (!request.getFeature().equals(UMLPackage.eINSTANCE.getNamedElement_Name())) {
// Pins of ReadStructuralFeatureAction should be create and update automatically
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/util/PinUpdateLinkEndDataCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/util/PinUpdateLinkEndDataCommand.java
new file mode 100644
index 00000000000..41a34afa8a8
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/util/PinUpdateLinkEndDataCommand.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.commands.util;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdaterLinkEndData;
+import org.eclipse.uml2.uml.LinkEndData;
+
+/**
+ *
+ * Pins of CreateLinkAction should be create and update automatically
+ *
+ */
+public class PinUpdateLinkEndDataCommand extends AbstractCommand {
+
+
+ /**
+ *
+ */
+ protected IPinUpdaterLinkEndData updater;
+
+ /**
+ *
+ */
+ protected LinkEndData node;
+
+ /**
+ * Constructor.
+ *
+ * @param label
+ */
+ public PinUpdateLinkEndDataCommand(String label, IPinUpdaterLinkEndData updater, LinkEndData node) {
+ super(label);
+ this.updater = updater;
+ this.node = node;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.common.core.command.AbstractCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param arg0
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor arg0, IAdaptable arg1) throws ExecutionException {
+ CommandResult result = CommandResult.newOKCommandResult();
+ try {
+ this.updater.updatePins(this.node);
+ } catch (Exception e) {
+ result = CommandResult.newErrorCommandResult(e);
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.common.core.command.AbstractCommand#doRedoWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param arg0
+ * @param arg1
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor arg0, IAdaptable arg1) throws ExecutionException {
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.common.core.command.AbstractCommand#doUndoWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param arg0
+ * @param arg1
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor arg0, IAdaptable arg1) throws ExecutionException {
+ return null;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/IPinUpdaterLinkEndData.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/IPinUpdaterLinkEndData.java
new file mode 100644
index 00000000000..db0b9049099
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/IPinUpdaterLinkEndData.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater;
+
+import org.eclipse.uml2.uml.LinkEndData;
+
+/**
+ *
+ * Pins of CreateLinkAction should be create and update automatically
+ *
+ */
+public interface IPinUpdaterLinkEndData {
+
+ /**
+ * The role of a 'pin updater' is to enable update of any pin of a particular linkEndData.
+ * This operation is intended to implement the the general algorithm to update pins.
+ *
+ * @param linkEndData
+ * the linkEndData for which the pins need to be updated
+ *
+ */
+ void updatePins(LinkEndData linkEndData);
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/PinUpdaterFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/PinUpdaterFactory.java
index 164bbee38dd..65721db0262 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/PinUpdaterFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/PinUpdaterFactory.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.AcceptCallActionPinUpdater;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.AcceptEventActionPinUpdater;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.AddStructuralFeatureValueActionPinUpdater;
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.CreateLinkActionPinUpdater;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.CreateObjectActionPinUpdater;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.ReadStructuralFeatureActionPinUpdater;
import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions.TestIdentityActionPinUpdater;
@@ -27,6 +28,7 @@ import org.eclipse.uml2.uml.ActivityNode;
import org.eclipse.uml2.uml.AddStructuralFeatureValueAction;
import org.eclipse.uml2.uml.CallBehaviorAction;
import org.eclipse.uml2.uml.CallOperationAction;
+import org.eclipse.uml2.uml.CreateLinkAction;
import org.eclipse.uml2.uml.CreateObjectAction;
import org.eclipse.uml2.uml.ReadStructuralFeatureAction;
import org.eclipse.uml2.uml.SendSignalAction;
@@ -91,6 +93,8 @@ public class PinUpdaterFactory {
updater = (IPinUpdater<T>) new ValueSpecificationActionPinUpdater();
} else if (node instanceof TestIdentityAction) {
updater = (IPinUpdater<T>) new TestIdentityActionPinUpdater();
+ } else if (node instanceof CreateLinkAction) {
+ updater = (IPinUpdater<T>) new CreateLinkActionPinUpdater();
}
return updater;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/CreateLinkActionPinUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/CreateLinkActionPinUpdater.java
new file mode 100644
index 00000000000..17537b64f77
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/CreateLinkActionPinUpdater.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions;
+
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.LinkAction;
+import org.eclipse.uml2.uml.LinkEndCreationData;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Pins of CreateLinkAction should be create and update automatically
+ *
+ * This class define derivation rules
+ */
+public class CreateLinkActionPinUpdater extends LinkActionPinUpdater {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdater#updatePins(org.eclipse.uml2.uml.Element)
+ *
+ * @param node
+ */
+ @Override
+ public void updatePins(LinkAction node) {
+ if (node != null) {
+ // 1] On destruction of a LinkEndCreationData destroy the LinkEndCreationData for the other end
+ if (node.getEndData().size() == 1 && node.getInputValues().size() > 1) {
+ node.getEndData().clear();
+ } else if (node.getEndData().size() == 1) {
+ // 2] On creation of a LinkEndCreationData create an other LinkEndCreationData for the other end
+ LinkEndCreationData linkEndCreationData = UMLFactory.eINSTANCE.createLinkEndCreationData();
+ InputPin value = UMLFactory.eINSTANCE.createInputPin();
+ Property firstEnd = node.getEndData().get(0).getEnd();
+ if (firstEnd != null) {
+ Property secondEnd = firstEnd.getOtherEnd();
+ if (secondEnd != null) {
+ linkEndCreationData.setEnd(secondEnd);
+ value.setType(secondEnd.getType());
+ value.setName(secondEnd.getName());
+ value.setLower(secondEnd.getLower());
+ value.setUpper(secondEnd.getUpper());
+ linkEndCreationData.setValue(value);
+ }
+ node.getEndData().add(linkEndCreationData);
+ }
+ }
+
+ // 3] update the list input values
+ super.updatePins(node);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkActionPinUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkActionPinUpdater.java
new file mode 100644
index 00000000000..187d777cbcc
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkActionPinUpdater.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractActionPinUpdater;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.LinkAction;
+import org.eclipse.uml2.uml.LinkEndData;
+
+/**
+ * Pins of CreateLinkAction should be create and update automatically
+ *
+ * This class define derivation rules
+ */
+public class LinkActionPinUpdater extends AbstractActionPinUpdater<LinkAction> {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdater#updatePins(org.eclipse.uml2.uml.Element)
+ *
+ * @param node
+ */
+ @Override
+ public void updatePins(LinkAction node) {
+ if (node != null) {
+ List<InputPin> values = node.getInputValues();
+ List<InputPin> keepingValues = new ArrayList<InputPin>();
+ List<LinkEndData> endData = node.getEndData();
+
+ // 1] put value pin of each LinkEndData into the keepingValues list
+ for (LinkEndData linkEndData : endData) {
+ InputPin valuePin = linkEndData.getValue();
+ keepingValues.add(valuePin);
+ }
+
+ // 2] delete edges of pins which are not in the keepingValues list
+ for (InputPin oldInputPin : values) {
+ if (!keepingValues.contains(oldInputPin)) {
+ deleteEdges(oldInputPin);
+ }
+ }
+
+ // 3] remove pin which are not in the keepingValues list and add others
+ values.clear();
+ values.addAll(keepingValues);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkEndCreationDataPinUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkEndCreationDataPinUpdater.java
new file mode 100644
index 00000000000..fd2d0d1da8b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkEndCreationDataPinUpdater.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions;
+
+import org.eclipse.uml2.uml.CreateLinkAction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.LinkEndCreationData;
+import org.eclipse.uml2.uml.LinkEndData;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Pins of CreateLinkAction should be create and update automatically
+ *
+ * This class define derivation rules
+ */
+public class LinkEndCreationDataPinUpdater extends LinkEndDataCommonPinUpdater {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdaterLinkEndData#updatePins(org.eclipse.uml2.uml.LinkEndData)
+ *
+ * @param linkEndData
+ */
+ @Override
+ public void updatePins(LinkEndData linkEndData) {
+ // 1] set value pin
+ super.updatePins(linkEndData);
+
+ InputPin value = linkEndData.getValue();
+ Property end = linkEndData.getEnd();
+ // 2] set the multiplicity of the value pin, same as the end
+ // But if the user need an insert at pin, he is free to set the multiplicity
+ if (value != null && end != null) {
+ if (((LinkEndCreationData) linkEndData).getInsertAt() == null) {
+ value.setLower(end.getLower());
+ value.setUpper(end.getUpper());
+ }
+ }
+
+ if (linkEndData != null) {
+ // 3] change the other linkEndData of the CreateLinkAction if there is only 2 linkEndData
+ Element parent = linkEndData.getOwner();
+ if (parent != null && parent instanceof CreateLinkAction) {
+ Property firstEnd = linkEndData.getEnd();
+ Property secondEnd = firstEnd.getOtherEnd();
+ if (((CreateLinkAction) parent).getEndData().size() == 2 && secondEnd != null) {
+ for (LinkEndData linkEndDataNonModified : ((CreateLinkAction) parent).getEndData()) {
+ if (linkEndDataNonModified != linkEndData) {
+ // 4] update the other linkEndData
+ // set its end with the other end
+ // set its value pin, same type and multiplicity as the end
+ linkEndDataNonModified.setEnd(secondEnd);
+ InputPin valueForSecondEnd = linkEndDataNonModified.getValue();
+ if (valueForSecondEnd == null) {
+ valueForSecondEnd = UMLFactory.eINSTANCE.createInputPin();
+ ((CreateLinkAction) parent).getInputValues().add(valueForSecondEnd);
+ }
+ valueForSecondEnd.setType(secondEnd.getType());
+ valueForSecondEnd.setName(secondEnd.getName());
+ valueForSecondEnd.setLower(secondEnd.getLower());
+ valueForSecondEnd.setUpper(secondEnd.getUpper());
+ linkEndDataNonModified.setValue(valueForSecondEnd);
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkEndDataCommonPinUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkEndDataCommonPinUpdater.java
new file mode 100644
index 00000000000..be81a06bb41
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/intermediateactions/LinkEndDataCommonPinUpdater.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.intermediateactions;
+
+import org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdaterLinkEndData;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.LinkEndData;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Pins of CreateLinkAction should be create and update automatically
+ *
+ * This class define derivation rules
+ */
+public class LinkEndDataCommonPinUpdater implements IPinUpdaterLinkEndData {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.IPinUpdaterLinkEndData#updatePins(org.eclipse.uml2.uml.LinkEndData)
+ *
+ * @param linkEndData
+ */
+ @Override
+ public void updatePins(LinkEndData linkEndData) {
+ if (linkEndData != null) {
+ Property end = linkEndData.getEnd();
+ // 1] create value pin if it is not created yet and if the end feature is specified
+ // the value pin should have the same type as the end
+ if (end != null) {
+ InputPin value = linkEndData.getValue();
+ if (value == null) {
+ value = UMLFactory.eINSTANCE.createInputPin();
+ }
+ value.setName(end.getName());
+ value.setType(end.getType());
+ linkEndData.setValue(value);
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/ActivityAutomatedModelCompletionPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/ActivityAutomatedModelCompletionPreferencePage.java
index fd3cdff9e62..9b54c4505ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/ActivityAutomatedModelCompletionPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/ActivityAutomatedModelCompletionPreferencePage.java
@@ -22,6 +22,7 @@ import org.eclipse.uml2.uml.AcceptCallAction;
import org.eclipse.uml2.uml.AcceptEventAction;
import org.eclipse.uml2.uml.ActivityNode;
import org.eclipse.uml2.uml.AddStructuralFeatureValueAction;
+import org.eclipse.uml2.uml.CreateLinkAction;
import org.eclipse.uml2.uml.CreateObjectAction;
import org.eclipse.uml2.uml.ReadStructuralFeatureAction;
import org.eclipse.uml2.uml.TestIdentityAction;
@@ -76,6 +77,7 @@ public class ActivityAutomatedModelCompletionPreferencePage extends AbstractAuto
actionList.add(AcceptCallAction.class);
actionList.add(AcceptEventAction.class);
actionList.add(AddStructuralFeatureValueAction.class);
+ actionList.add(CreateLinkAction.class);
actionList.add(CreateObjectAction.class);
actionList.add(ReadStructuralFeatureAction.class);
actionList.add(TestIdentityAction.class);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/AutomatedModelCompletionPreferencesInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/AutomatedModelCompletionPreferencesInitializer.java
index 7484e12723b..0b853efe3bc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/AutomatedModelCompletionPreferencesInitializer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/AutomatedModelCompletionPreferencesInitializer.java
@@ -47,6 +47,7 @@ public class AutomatedModelCompletionPreferencesInitializer extends AbstractPref
store.setDefault(IAutomatedModelCompletionPreferencesConstants.ACCEPT_CALL_ACTION_ACCELERATOR, PIN_SYNCHRONIZATION);
store.setDefault(IAutomatedModelCompletionPreferencesConstants.ACCEPTE_EVENT_ACTION_ACCELERATOR, PIN_SYNCHRONIZATION);
store.setDefault(IAutomatedModelCompletionPreferencesConstants.ADD_STRUCTURAL_FEATURE_VALUE_ACTION_ACCELERATOR, PIN_SYNCHRONIZATION);
+ store.setDefault(IAutomatedModelCompletionPreferencesConstants.CREATE_LINK_ACTION_ACCELERATOR, PIN_SYNCHRONIZATION);
store.setDefault(IAutomatedModelCompletionPreferencesConstants.CREATE_OBJECT_ACTION_ACCELERATOR, PIN_SYNCHRONIZATION);
store.setDefault(IAutomatedModelCompletionPreferencesConstants.READ_STRUCTURAL_FEATURE_ACTION_ACCELERATOR, PIN_SYNCHRONIZATION);
store.setDefault(IAutomatedModelCompletionPreferencesConstants.TEST_IDENTITY_ACTION, PIN_SYNCHRONIZATION);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/IAutomatedModelCompletionPreferencesConstants.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/IAutomatedModelCompletionPreferencesConstants.java
index 3dcaddc0248..bb46d494eb0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/IAutomatedModelCompletionPreferencesConstants.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/preferences/IAutomatedModelCompletionPreferencesConstants.java
@@ -26,6 +26,8 @@ public interface IAutomatedModelCompletionPreferencesConstants {
final public String ADD_STRUCTURAL_FEATURE_VALUE_ACTION_ACCELERATOR = "org.eclipse.papyrus.uml.diagram.activity.preferences.addStructuralFeatureValueAction";
+ final public String CREATE_LINK_ACTION_ACCELERATOR = "org.eclipse.papyrus.uml.diagram.activity.preferences.createLinkAction";
+
final public String CREATE_OBJECT_ACTION_ACCELERATOR = "org.eclipse.papyrus.uml.diagram.activity.preferences.createObjectAction";
final public String READ_STRUCTURAL_FEATURE_ACTION_ACCELERATOR = "org.eclipse.papyrus.uml.diagram.activity.preferences.readStructuralFeatureAction";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/listeners/ObjectNodeListener.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/listeners/ObjectNodeListener.java
index 9e9dd655c3b..c5002befb06 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/listeners/ObjectNodeListener.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/listeners/ObjectNodeListener.java
@@ -45,7 +45,7 @@ public class ObjectNodeListener extends AbstractPapyrusModifcationTriggerListene
if (notif.getNewValue() instanceof ObjectNode && notif.getFeature() instanceof EReference && ((EReference) notif.getFeature()).isContainment()) {
cc = new CompositeCommand("Modify Pin");
final ObjectNode object = (ObjectNode) notif.getNewValue();
- if (object.getUpperBound() == null) {
+ if (object.getUpperBound() == null && AdapterFactoryEditingDomain.getEditingDomainFor(object) != null) {
LiteralInteger literalInteger = UMLFactory.eINSTANCE.createLiteralInteger();
literalInteger.setValue(1);
cc.compose(new EMFtoGMFCommandWrapper(SetCommand.create(AdapterFactoryEditingDomain.getEditingDomainFor(object), object, UMLPackage.Literals.OBJECT_NODE__UPPER_BOUND, literalInteger)));

Back to the top