Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-08-19 19:56:08 +0000
committerChristian W. Damus2016-08-22 21:07:02 +0000
commit3f4f67b63ee1070306cae6d10d348848461a8ed1 (patch)
treeb12b0afea11918516e438680c83fca419f14c6fb /plugins/infra/gmfdiag
parentb875ea7b4260bf5f56e1a61f1598337e329f6a19 (diff)
downloadorg.eclipse.papyrus-3f4f67b63ee1070306cae6d10d348848461a8ed1.tar.gz
org.eclipse.papyrus-3f4f67b63ee1070306cae6d10d348848461a8ed1.tar.xz
org.eclipse.papyrus-3f4f67b63ee1070306cae6d10d348848461a8ed1.zip
Bug 499695: Messages do not show up when sequence diagram is synchronized with model
https://bugs.eclipse.org/bugs/show_bug.cgi?id=499695 Customize canonical child strategy in Sequence Diagram to better match what is actually visualized in the diagram. Fix missing default location parameter in connection creation requests in the PapyrusCanonicalEditPolicy (the sequence diagram's semantic creation policy assumes that the location is present). Change-Id: Ib6f6b41128e2761c1627dc0ed1622d00f280baf9 (cherry picked from commit f3cbde5c1302046c1095d97fbb024df89b7ab630)
Diffstat (limited to 'plugins/infra/gmfdiag')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java
index a5ef24c7b5d..29156567721 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ * Copyright (c) 2014, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,11 +8,7 @@
*
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Christian W. Damus - bug 433206
- * Christian W. Damus - bug 420549
- * Christian W. Damus - bug 472155
- * Christian W. Damus - bug 471954
- * Christian W. Damus - bug 477384
+ * Christian W. Damus - bugs 433206, 420549, 472155, 471954, 477384, 499695
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.canonical.editpolicy;
@@ -27,6 +23,7 @@ import java.util.WeakHashMap;
import java.util.concurrent.Callable;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.SetCommand;
@@ -409,7 +406,7 @@ public class PapyrusCanonicalEditPolicy extends CanonicalEditPolicy implements I
* @return the list of all semantic element display by parents edipart.
*/
protected ArrayList<EObject> getAllEObjectAncestor() {
- ArrayList<EObject> ancestor = new ArrayList<EObject>();
+ ArrayList<EObject> ancestor = new ArrayList<>();
EditPart currentEditPart = getHost();
if (currentEditPart.getModel() instanceof View) {
ancestor.add(((View) currentEditPart.getModel()).getElement());
@@ -514,7 +511,7 @@ public class PapyrusCanonicalEditPolicy extends CanonicalEditPolicy implements I
// current views
List<View> viewChildren = getViewChildren(kind);
List<EObject> allSemanticChildren = getSemanticChildrenList(kind);
- List<EObject> semanticChildren = new ArrayList<EObject>(allSemanticChildren);
+ List<EObject> semanticChildren = new ArrayList<>(allSemanticChildren);
boolean changed = false;
@@ -748,6 +745,10 @@ public class PapyrusCanonicalEditPolicy extends CanonicalEditPolicy implements I
ccvr.setTargetEditPart(ccd.getTargetEditPart());
}
+ // Unlike CreateViewRequest, this request's constructor doesn't
+ // initialize the location
+ ccvr.setLocation(new Point(-1, -1));
+
result = ccvr;
} else {
result = new CreateViewRequest(viewDescriptor);

Back to the top