Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Marques2015-05-26 05:53:29 -0400
committerPatrick Tessier2015-05-27 05:08:50 -0400
commit2e45db7f9004008b3965bbf33cfcde649aec0f8f (patch)
treed9a333923a9e15c033a1362da75f1eadfa18abc8
parentfd3ec5f8fdaa3fb35880ecb88f79af7775fad57b (diff)
downloadorg.eclipse.papyrus-2e45db7f9004008b3965bbf33cfcde649aec0f8f.tar.gz
org.eclipse.papyrus-2e45db7f9004008b3965bbf33cfcde649aec0f8f.tar.xz
org.eclipse.papyrus-2e45db7f9004008b3965bbf33cfcde649aec0f8f.zip
Bug 463290 - Papyrus diagram shall be expanded with new visual graphical
fix bug about dnd in the expansion framework Change-Id: I6e68e8f7365fe8818f88af6d5354a530481cf26c Signed-off-by: Bruno Marques <bruno.marques@cea.fr> Reviewed-on: https://git.eclipse.org/r/48605 Tested-by: Hudson CI Reviewed-by: Patrick Tessier <Patrick.Tessier@cea.fr>
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java
index 3740811cf04..1e146170d24 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
@@ -116,7 +117,14 @@ public class ExpansionElementDropStrategy extends TransactionalDropStrategy {
return null;
}
//look for all possible children for the current target.
- List<String>childrenList =listRepresentation.parentChildrenRelation.get(graphicalEditPart.getNotationView().getType());
+ List<String>childrenList=null;
+ if(graphicalEditPart instanceof DiagramEditPart){
+ childrenList =listRepresentation.parentChildrenRelation.get(diagramType);
+ }
+ else{
+ childrenList =listRepresentation.parentChildrenRelation.get(graphicalEditPart.getNotationView().getType());
+ }
+
if(childrenList==null){
return null;
}

Back to the top