Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Schnekenburger2015-02-06 10:00:09 +0000
committerRemi Schnekenburger2015-02-06 10:00:09 +0000
commit6023882e6cdd3d0757e876d62a174334eec7223c (patch)
tree53a5a0ab22b49812a0a667a64c99fc3ad70f9ecf /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common
parent9fc8acd1f3d122728b165de76e601af416e6e6d0 (diff)
downloadorg.eclipse.papyrus-bugs/458619-expansionRegion.tar.gz
org.eclipse.papyrus-bugs/458619-expansionRegion.tar.xz
org.eclipse.papyrus-bugs/458619-expansionRegion.zip
458619: Issues with Expansion region (can not create Input Expansionbugs/458619-expansionRegion
Node and can not embed expansion region in another expansion region) https://bugs.eclipse.org/bugs/show_bug.cgi?id=458619
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java
index ed28e175964..7fe7d4b93df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.commands.UnexecutableCommand;
@@ -123,7 +124,7 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
Command createCommand = getHost().getCommand(createViewRequest);
return createCommand;
}
-
+
/**
* the method provides command to create the binary link into the diagram.
* If the source and the target views do not exist, these views will be
@@ -248,14 +249,22 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
// Create a view request from the drop request and then forward getting
// the command for that.
- CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
+ CompositeCommand cc = null;
Iterator<?> iter = dropRequest.getObjects().iterator();
while(iter.hasNext()) {
EObject droppedObject = (EObject)iter.next();
- cc.add(getDropObjectCommand(dropRequest, droppedObject));
+ IUndoableOperation operation= getDropObjectCommand(dropRequest, droppedObject);
+ if(operation !=null) {
+ if(cc==null) {
+ cc = new CompositeCommand("Drop"); //$NON-NLS-1$
+ }
+ cc.add(operation);
+ }
+ }
+ if(cc==null) {
+ return null;
}
-
return new ICommandProxy(cc);
}

Back to the top