Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2016-11-14 13:03:16 +0000
committerGerrit Code Review @ Eclipse.org2016-11-20 20:03:53 +0000
commit1ff56de32315da9a4e9293d59579bd71df468b6e (patch)
tree5b98582966dbcbba3cce48753fdd84092fa664d3
parent0fad816c5faf6b7391a0fa8cab814b8a0de0fe6e (diff)
downloadorg.eclipse.papyrus-1ff56de32315da9a4e9293d59579bd71df468b6e.tar.gz
org.eclipse.papyrus-1ff56de32315da9a4e9293d59579bd71df468b6e.tar.xz
org.eclipse.papyrus-1ff56de32315da9a4e9293d59579bd71df468b6e.zip
Bug 506127 - [SysML 1.1] Name label of Association/Connector misplaced
after a move. https://bugs.eclipse.org/bugs/show_bug.cgi?id=506127 - Replaced LinkLabelDragEditPolicy by PapyrusLinkLabelDragPolicy as PRIMARY_DRAG_ROLE for sysml label edit parts. Change-Id: Ia5ee791de4b01760be2ee661c6b40a14deb33562 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net> (cherry picked from commit cb8d5cf0fe18f1769e369ea8ec620dc084e9e023)
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LinkLabelDragEditPolicy.java3
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeLinkLabelEditPart.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelEditPart.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelSourceMultiplicityEditPart.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelTargetMultiplicityEditPart.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementLinkLabelNameEditPart.java4
10 files changed, 21 insertions, 18 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LinkLabelDragEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LinkLabelDragEditPolicy.java
index 76833fcc528..3ba01b4790d 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LinkLabelDragEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LinkLabelDragEditPolicy.java
@@ -19,11 +19,14 @@ import java.util.List;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
/**
* Abstract non-diagram specific drag edit policy for link labels.
* This class is adapted from edit parts generated by GMF Tooling.
+ * Deprecated: use {@link PapyrusLinkLabelDragPolicy} instead.
*/
+@Deprecated
public class LinkLabelDragEditPolicy extends NonResizableLabelEditPolicy {
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeLinkLabelEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeLinkLabelEditPart.java
index b0bc849943c..ed7894be2d6 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeLinkLabelEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeLinkLabelEditPart.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.uml.diagram.common.edit.part;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
/**
@@ -37,7 +37,7 @@ public class AppliedStereotypeLinkLabelEditPart extends AbstractElementLabelEdit
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java
index d85d3c0a03b..9475db9dc26 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
import org.eclipse.uml2.uml.Association;
@@ -39,7 +39,7 @@ public class AssociationLinkLabelSourceMultiplicityEditPart extends AbstractElem
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java
index 8b64595f476..deff0c57a04 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
import org.eclipse.uml2.uml.Association;
@@ -39,7 +39,7 @@ public class AssociationLinkLabelSourceRoleEditPart extends AbstractElementLabel
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java
index b612478b8f1..8a6ed49d0ec 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
import org.eclipse.uml2.uml.Association;
@@ -39,7 +39,7 @@ public class AssociationLinkLabelTargetMultiplicityEditPart extends AbstractElem
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java
index c008c4c0cf2..d87bef97665 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
import org.eclipse.uml2.uml.Association;
@@ -39,7 +39,7 @@ public class AssociationLinkLabelTargetRoleEditPart extends AbstractElementLabel
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelEditPart.java
index 25762bee405..2249fb48cac 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelEditPart.java
@@ -15,7 +15,7 @@ package org.eclipse.papyrus.uml.diagram.common.edit.part;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
/**
* Edit Part for link label showing {@link Connector} label.
@@ -34,7 +34,7 @@ public class ConnectorLinkLabelEditPart extends AbstractElementLabelEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelSourceMultiplicityEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelSourceMultiplicityEditPart.java
index 488470b7d81..e55d3f0cb2f 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelSourceMultiplicityEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelSourceMultiplicityEditPart.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.ConnectorEnd;
@@ -39,7 +39,7 @@ public class ConnectorLinkLabelSourceMultiplicityEditPart extends AbstractElemen
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelTargetMultiplicityEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelTargetMultiplicityEditPart.java
index 88ade91b6f4..e628c640486 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelTargetMultiplicityEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelTargetMultiplicityEditPart.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.ConnectorEnd;
@@ -39,7 +39,7 @@ public class ConnectorLinkLabelTargetMultiplicityEditPart extends AbstractElemen
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementLinkLabelNameEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementLinkLabelNameEditPart.java
index 20a62799feb..9fd5a7198b0 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementLinkLabelNameEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementLinkLabelNameEditPart.java
@@ -15,7 +15,7 @@ package org.eclipse.papyrus.uml.diagram.common.edit.part;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LinkLabelDragEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
import org.eclipse.uml2.uml.NamedElement;
/**
@@ -35,7 +35,7 @@ public class NamedElementLinkLabelNameEditPart extends AbstractElementLabelEditP
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LinkLabelDragEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
}
/**

Back to the top