Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradaussy2012-07-05 14:59:21 +0000
committeradaussy2012-07-05 14:59:21 +0000
commit576005a6e1441ae8cf586ebd5fbdee8aec506a96 (patch)
treeffdaf6b3df0b960f5932550a8a7657a277de3835 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication
parent8fcdedfc16012fce86b49257388d504d656700e8 (diff)
downloadorg.eclipse.papyrus-576005a6e1441ae8cf586ebd5fbdee8aec506a96.tar.gz
org.eclipse.papyrus-576005a6e1441ae8cf586ebd5fbdee8aec506a96.tar.xz
org.eclipse.papyrus-576005a6e1441ae8cf586ebd5fbdee8aec506a96.zip
[Backport EYY]
Template has been modified. Only Class and Activity diagram has been regenerated. The other changes were hand made 374607: [model explorer] moving a model element in another model does not move associated (backport finished) 374608: [model explorer] moving a model element in another model does not move associated (Backport finished)
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java
index ee63b7dacfe..19e5cca086b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import java.util.Iterator;
import java.util.Map;
import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
@@ -284,11 +285,19 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected Command getMoveCommand(MoveRequest req) {
-
-
- return getGEFWrapper(new MoveElementsCommand(req));
-
-
+ EObject targetCEObject = req.getTargetContainer();
+ if(targetCEObject != null) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
+ if(provider != null) {
+ ICommand moveCommand = provider.getEditCommand(req);
+ if(moveCommand != null) {
+ return new ICommandProxy(moveCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ } else {
+ return getGEFWrapper(new MoveElementsCommand(req));
+ }
}
/**

Back to the top