Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2018-08-29 12:02:22 -0400
committerPatrick Tessier2018-09-14 08:59:29 -0400
commite62897b3529384e36ff7892c2910041fd6edde15 (patch)
tree064d8410ddc56d5fe4af1f97f0c22a9825ed9098
parentd0de0f6e605c1083f1347a5344542d794931b5b0 (diff)
downloadorg.eclipse.papyrus-e62897b3529384e36ff7892c2910041fd6edde15.tar.gz
org.eclipse.papyrus-e62897b3529384e36ff7892c2910041fd6edde15.tar.xz
org.eclipse.papyrus-e62897b3529384e36ff7892c2910041fd6edde15.zip
Bug 538394: [Sequence Diagram] Impossible to visualize stereotype of
lifelines Add the needed edit policy Change-Id: Ic9a37ab990580d81fbe9a0684f10af5d856d692b Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen4
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java46
2 files changed, 32 insertions, 18 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
index 63807702a9c..4422b7f4bef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
@@ -435,6 +435,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifeLineResizeAffixedNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Lifeline"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
index c9b8f7ace48..38ecb782eae 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
@@ -40,6 +40,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNode
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifeLineResizeAffixedNodeEditPolicy;
@@ -96,15 +98,14 @@ public class LifelineEditPart extends RoundedCompartmentEditPart {
// installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(ConnectRectangleToGridEditPolicy.CONNECT_TO_GRILLING_MANAGEMENT,
- new ConnectRectangleToGridEditPolicy());
+ installEditPolicy(ConnectRectangleToGridEditPolicy.CONNECT_TO_GRILLING_MANAGEMENT, new ConnectRectangleToGridEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new GrillingBasedResizableShapeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new LifeLineGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new LifeLineXYLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new LifelineCreationEditPolicy());
- installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE,
- new LifeLineResizeAffixedNodeEditPolicy());
+ installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new LifeLineResizeAffixedNodeEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
@@ -187,46 +188,57 @@ public class LifelineEditPart extends RoundedCompartmentEditPart {
return true;
}
+
+
+
// Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
if (childEditPart instanceof StateInvariantEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((StateInvariantEditPart) childEditPart).getFigure(),
- locator);
+ getBorderedFigure().getBorderItemContainer().add(((StateInvariantEditPart) childEditPart).getFigure(), locator);
return true;
}
+
+
+
// Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
if (childEditPart instanceof TimeConstraintEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((TimeConstraintEditPart) childEditPart).getFigure(),
- locator);
+ getBorderedFigure().getBorderItemContainer().add(((TimeConstraintEditPart) childEditPart).getFigure(), locator);
return true;
}
+
+
+
// Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
if (childEditPart instanceof TimeObservationEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((TimeObservationEditPart) childEditPart).getFigure(),
- locator);
+ getBorderedFigure().getBorderItemContainer().add(((TimeObservationEditPart) childEditPart).getFigure(), locator);
return true;
}
+
+
+
// Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
if (childEditPart instanceof DurationConstraintEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((DurationConstraintEditPart) childEditPart).getFigure(),
- locator);
+ getBorderedFigure().getBorderItemContainer().add(((DurationConstraintEditPart) childEditPart).getFigure(), locator);
return true;
}
+
+
+
// Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
if (childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.SOUTH);
- getBorderedFigure().getBorderItemContainer()
- .add(((DestructionOccurrenceSpecificationEditPart) childEditPart).getFigure(), locator);
+ getBorderedFigure().getBorderItemContainer().add(((DestructionOccurrenceSpecificationEditPart) childEditPart).getFigure(), locator);
return true;
}
+
return false;
}
@@ -250,13 +262,11 @@ public class LifelineEditPart extends RoundedCompartmentEditPart {
return true;
}
if (childEditPart instanceof DurationConstraintEditPart) {
- getBorderedFigure().getBorderItemContainer()
- .remove(((DurationConstraintEditPart) childEditPart).getFigure());
+ getBorderedFigure().getBorderItemContainer().remove(((DurationConstraintEditPart) childEditPart).getFigure());
return true;
}
if (childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- getBorderedFigure().getBorderItemContainer()
- .remove(((DestructionOccurrenceSpecificationEditPart) childEditPart).getFigure());
+ getBorderedFigure().getBorderItemContainer().remove(((DestructionOccurrenceSpecificationEditPart) childEditPart).getFigure());
return true;
}
return false;

Back to the top