[581287] Provide new Edge decorators required for UML Associations and ContainmentLink
- add required literals to EdgeArrows: CirclePlus, DiamondWithDot, FillDiamondWithDot, InputArrowWithDiamondAndDot, InputArrowWithDot, InputArrowWithFillDiamondAndDot
- provide icons for new literals
- complete properties sections style
- provide edge decorations for these new literals
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=581287
Change-Id: I22c9609047b6ec8d5628361cff0f7fd50a25235a
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
diff --git a/plugins/org.eclipse.sirius.diagram.model/model/diagram.ecore b/plugins/org.eclipse.sirius.diagram.model/model/diagram.ecore
index 49eda72..e05390d 100644
--- a/plugins/org.eclipse.sirius.diagram.model/model/diagram.ecore
+++ b/plugins/org.eclipse.sirius.diagram.model/model/diagram.ecore
@@ -821,6 +821,41 @@
<details key="imagePath" value="icons/full/decorator/inputArrowWithFillDiamond.gif"/>
</eAnnotations>
</eLiterals>
+ <eLiterals name="CirclePlus" value="11" literal="CirclePlus">
+ <eAnnotations source="Sirius">
+ <details key="imagePath" value="icons/full/decorator/circlePlus.gif"/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="Dot" value="12" literal="Dot">
+ <eAnnotations source="Sirius">
+ <details key="imagePath" value="icons/full/decorator/dot.gif"/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="InputArrowWithDot" value="13" literal="InputArrowWithDot">
+ <eAnnotations source="Sirius">
+ <details key="imagePath" value="icons/full/decorator/inputArrowWithDot.gif"/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="DiamondWithDot" value="14" literal="DiamondWithDot">
+ <eAnnotations source="Sirius">
+ <details key="imagePath" value="icons/full/decorator/diamondWithDot.gif"/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="FillDiamondWithDot" value="15" literal="FillDiamondWithDot">
+ <eAnnotations source="Sirius">
+ <details key="imagePath" value="icons/full/decorator/fillDiamondWithDot.gif"/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="InputArrowWithDiamondAndDot" value="16" literal="InputArrowWithDiamondAndDot">
+ <eAnnotations source="Sirius">
+ <details key="imagePath" value="icons/full/decorator/inputArrowWithDiamondAndDot.gif"/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="InputArrowWithFillDiamondAndDot" value="17" literal="InputArrowWithFillDiamondAndDot">
+ <eAnnotations source="Sirius">
+ <details key="imagePath" value="icons/full/decorator/inputArrowWithFillDiamondAndDot.gif"/>
+ </eAnnotations>
+ </eLiterals>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="EdgeRouting">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
diff --git a/plugins/org.eclipse.sirius.diagram.model/model/diagram.genmodel b/plugins/org.eclipse.sirius.diagram.model/model/diagram.genmodel
index 3ed24d4..a69935d 100644
--- a/plugins/org.eclipse.sirius.diagram.model/model/diagram.genmodel
+++ b/plugins/org.eclipse.sirius.diagram.model/model/diagram.genmodel
@@ -57,6 +57,13 @@
<genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/FillDiamond"/>
<genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/InputArrowWithDiamond"/>
<genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/InputArrowWithFillDiamond"/>
+ <genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/CirclePlus"/>
+ <genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/Dot"/>
+ <genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/InputArrowWithDot"/>
+ <genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/DiamondWithDot"/>
+ <genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/FillDiamondWithDot"/>
+ <genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/InputArrowWithDiamondAndDot"/>
+ <genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeArrows/InputArrowWithFillDiamondAndDot"/>
</genEnums>
<genEnums ecoreEnum="diagram.ecore#//EdgeRouting">
<genEnumLiterals ecoreEnumLiteral="diagram.ecore#//EdgeRouting/straight"/>
diff --git a/plugins/org.eclipse.sirius.diagram.model/src-gen/org/eclipse/sirius/diagram/EdgeArrows.java b/plugins/org.eclipse.sirius.diagram.model/src-gen/org/eclipse/sirius/diagram/EdgeArrows.java
index 658e79d..41b0f51 100644
--- a/plugins/org.eclipse.sirius.diagram.model/src-gen/org/eclipse/sirius/diagram/EdgeArrows.java
+++ b/plugins/org.eclipse.sirius.diagram.model/src-gen/org/eclipse/sirius/diagram/EdgeArrows.java
@@ -126,7 +126,65 @@
* @generated
* @ordered
*/
- INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL(10, "InputArrowWithFillDiamond", "InputArrowWithFillDiamond"); //$NON-NLS-1$ //$NON-NLS-2$
+ INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL(10, "InputArrowWithFillDiamond", "InputArrowWithFillDiamond"), //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * The '<em><b>Circle Plus</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #CIRCLE_PLUS
+ * @generated
+ * @ordered
+ */
+ CIRCLE_PLUS_LITERAL(11, "CirclePlus", "CirclePlus"), //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * The '<em><b>Dot</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #DOT
+ * @generated
+ * @ordered
+ */
+ DOT_LITERAL(12, "Dot", "Dot"), //$NON-NLS-1$//$NON-NLS-2$
+ /**
+ * The '<em><b>Input Arrow With Dot</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #INPUT_ARROW_WITH_DOT
+ * @generated
+ * @ordered
+ */
+ INPUT_ARROW_WITH_DOT_LITERAL(13, "InputArrowWithDot", "InputArrowWithDot"), //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * The '<em><b>Diamond With Dot</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #DIAMOND_WITH_DOT
+ * @generated
+ * @ordered
+ */
+ DIAMOND_WITH_DOT_LITERAL(14, "DiamondWithDot", "DiamondWithDot"), //$NON-NLS-1$//$NON-NLS-2$
+ /**
+ * The '<em><b>Fill Diamond With Dot</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #FILL_DIAMOND_WITH_DOT
+ * @generated
+ * @ordered
+ */
+ FILL_DIAMOND_WITH_DOT_LITERAL(15, "FillDiamondWithDot", "FillDiamondWithDot"), //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * The '<em><b>Input Arrow With Diamond And Dot</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #INPUT_ARROW_WITH_DIAMOND_AND_DOT
+ * @generated
+ * @ordered
+ */
+ INPUT_ARROW_WITH_DIAMOND_AND_DOT_LITERAL(16, "InputArrowWithDiamondAndDot", "InputArrowWithDiamondAndDot"), //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * The '<em><b>Input Arrow With Fill Diamond And Dot</b></em>' literal object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT
+ * @generated
+ * @ordered
+ */
+ INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT_LITERAL(17, "InputArrowWithFillDiamondAndDot", "InputArrowWithFillDiamondAndDot"); //$NON-NLS-1$ //$NON-NLS-2$
/**
* The '<em><b>No Decoration</b></em>' literal value. <!-- begin-user-doc -->
@@ -297,12 +355,88 @@
public static final int INPUT_ARROW_WITH_FILL_DIAMOND = 10;
/**
+ * The '<em><b>Circle Plus</b></em>' literal value. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #CIRCLE_PLUS_LITERAL
+ * @model name="CirclePlus" annotation="Sirius imagePath='icons/full/decorator/circlePlus.gif'"
+ * @generated
+ * @ordered
+ */
+ public static final int CIRCLE_PLUS = 11;
+
+ /**
+ * The '<em><b>Dot</b></em>' literal value. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #DOT_LITERAL
+ * @model name="Dot" annotation="Sirius imagePath='icons/full/decorator/dot.gif'"
+ * @generated
+ * @ordered
+ */
+ public static final int DOT = 12;
+
+ /**
+ * The '<em><b>Input Arrow With Dot</b></em>' literal value. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #INPUT_ARROW_WITH_DOT_LITERAL
+ * @model name="InputArrowWithDot" annotation="Sirius imagePath='icons/full/decorator/inputArrowWithDot.gif'"
+ * @generated
+ * @ordered
+ */
+ public static final int INPUT_ARROW_WITH_DOT = 13;
+
+ /**
+ * The '<em><b>Diamond With Dot</b></em>' literal value. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #DIAMOND_WITH_DOT_LITERAL
+ * @model name="DiamondWithDot" annotation="Sirius imagePath='icons/full/decorator/diamondWithDot.gif'"
+ * @generated
+ * @ordered
+ */
+ public static final int DIAMOND_WITH_DOT = 14;
+
+ /**
+ * The '<em><b>Fill Diamond With Dot</b></em>' literal value. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #FILL_DIAMOND_WITH_DOT_LITERAL
+ * @model name="FillDiamondWithDot" annotation="Sirius imagePath='icons/full/decorator/fillDiamondWithDot.gif'"
+ * @generated
+ * @ordered
+ */
+ public static final int FILL_DIAMOND_WITH_DOT = 15;
+
+ /**
+ * The '<em><b>Input Arrow With Diamond And Dot</b></em>' literal value. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #INPUT_ARROW_WITH_DIAMOND_AND_DOT_LITERAL
+ * @model name="InputArrowWithDiamondAndDot" annotation="Sirius
+ * imagePath='icons/full/decorator/inputArrowWithDiamondAndDot.gif'"
+ * @generated
+ * @ordered
+ */
+ public static final int INPUT_ARROW_WITH_DIAMOND_AND_DOT = 16;
+
+ /**
+ * The '<em><b>Input Arrow With Fill Diamond And Dot</b></em>' literal value. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT_LITERAL
+ * @model name="InputArrowWithFillDiamondAndDot" annotation="Sirius
+ * imagePath='icons/full/decorator/inputArrowWithFillDiamondAndDot.gif'"
+ * @generated
+ * @ordered
+ */
+ public static final int INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT = 17;
+
+ /**
* An array of all the '<em><b>Edge Arrows</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private static final EdgeArrows[] VALUES_ARRAY = new EdgeArrows[] { NO_DECORATION_LITERAL, OUTPUT_ARROW_LITERAL, INPUT_ARROW_LITERAL, OUTPUT_CLOSED_ARROW_LITERAL, INPUT_CLOSED_ARROW_LITERAL,
- OUTPUT_FILL_CLOSED_ARROW_LITERAL, INPUT_FILL_CLOSED_ARROW_LITERAL, DIAMOND_LITERAL, FILL_DIAMOND_LITERAL, INPUT_ARROW_WITH_DIAMOND_LITERAL, INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL, };
+ OUTPUT_FILL_CLOSED_ARROW_LITERAL, INPUT_FILL_CLOSED_ARROW_LITERAL, DIAMOND_LITERAL, FILL_DIAMOND_LITERAL, INPUT_ARROW_WITH_DIAMOND_LITERAL, INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL,
+ CIRCLE_PLUS_LITERAL, DOT_LITERAL, INPUT_ARROW_WITH_DOT_LITERAL, DIAMOND_WITH_DOT_LITERAL, FILL_DIAMOND_WITH_DOT_LITERAL, INPUT_ARROW_WITH_DIAMOND_AND_DOT_LITERAL,
+ INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT_LITERAL, };
/**
* A public read-only list of all the '<em><b>Edge Arrows</b></em>' enumerators. <!-- begin-user-doc --> <!--
@@ -381,6 +515,20 @@
return INPUT_ARROW_WITH_DIAMOND_LITERAL;
case INPUT_ARROW_WITH_FILL_DIAMOND:
return INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL;
+ case CIRCLE_PLUS:
+ return CIRCLE_PLUS_LITERAL;
+ case DOT:
+ return DOT_LITERAL;
+ case INPUT_ARROW_WITH_DOT:
+ return INPUT_ARROW_WITH_DOT_LITERAL;
+ case DIAMOND_WITH_DOT:
+ return DIAMOND_WITH_DOT_LITERAL;
+ case FILL_DIAMOND_WITH_DOT:
+ return FILL_DIAMOND_WITH_DOT_LITERAL;
+ case INPUT_ARROW_WITH_DIAMOND_AND_DOT:
+ return INPUT_ARROW_WITH_DIAMOND_AND_DOT_LITERAL;
+ case INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT:
+ return INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT_LITERAL;
}
return null;
}
diff --git a/plugins/org.eclipse.sirius.diagram.model/src-gen/org/eclipse/sirius/diagram/impl/DiagramPackageImpl.java b/plugins/org.eclipse.sirius.diagram.model/src-gen/org/eclipse/sirius/diagram/impl/DiagramPackageImpl.java
index 239dafe..02d48fa 100644
--- a/plugins/org.eclipse.sirius.diagram.model/src-gen/org/eclipse/sirius/diagram/impl/DiagramPackageImpl.java
+++ b/plugins/org.eclipse.sirius.diagram.model/src-gen/org/eclipse/sirius/diagram/impl/DiagramPackageImpl.java
@@ -3322,6 +3322,13 @@
addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.FILL_DIAMOND_LITERAL);
addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.INPUT_ARROW_WITH_DIAMOND_LITERAL);
addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL);
+ addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.CIRCLE_PLUS_LITERAL);
+ addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.DOT_LITERAL);
+ addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.INPUT_ARROW_WITH_DOT_LITERAL);
+ addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.DIAMOND_WITH_DOT_LITERAL);
+ addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.FILL_DIAMOND_WITH_DOT_LITERAL);
+ addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.INPUT_ARROW_WITH_DIAMOND_AND_DOT_LITERAL);
+ addEEnumLiteral(edgeArrowsEEnum, EdgeArrows.INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT_LITERAL);
initEEnum(edgeRoutingEEnum, EdgeRouting.class, "EdgeRouting"); //$NON-NLS-1$
addEEnumLiteral(edgeRoutingEEnum, EdgeRouting.STRAIGHT_LITERAL);
@@ -3411,6 +3418,20 @@
});
addAnnotation(edgeArrowsEEnum.getELiterals().get(10), source, new String[] { "imagePath", "icons/full/decorator/inputArrowWithFillDiamond.gif" //$NON-NLS-1$ //$NON-NLS-2$
});
+ addAnnotation(edgeArrowsEEnum.getELiterals().get(11), source, new String[] { "imagePath", "icons/full/decorator/circlePlus.gif" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(edgeArrowsEEnum.getELiterals().get(12), source, new String[] { "imagePath", "icons/full/decorator/dot.gif" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(edgeArrowsEEnum.getELiterals().get(13), source, new String[] { "imagePath", "icons/full/decorator/inputArrowWithDot.gif" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(edgeArrowsEEnum.getELiterals().get(14), source, new String[] { "imagePath", "icons/full/decorator/diamondWithDot.gif" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(edgeArrowsEEnum.getELiterals().get(15), source, new String[] { "imagePath", "icons/full/decorator/fillDiamondWithDot.gif" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(edgeArrowsEEnum.getELiterals().get(16), source, new String[] { "imagePath", "icons/full/decorator/inputArrowWithDiamondAndDot.gif" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(edgeArrowsEEnum.getELiterals().get(17), source, new String[] { "imagePath", "icons/full/decorator/inputArrowWithFillDiamondAndDot.gif" //$NON-NLS-1$ //$NON-NLS-2$
+ });
}
} // DiagramPackageImpl
diff --git a/plugins/org.eclipse.sirius.diagram.ui/plugin.properties b/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
index 5da1ce0..bdd25c0 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
+++ b/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
@@ -1427,3 +1427,10 @@
_UI_HideLabelFilter_childrenToHide_feature = Children To Hide
_UI_DDiagram_hiddenLabels_feature = Hidden Labels
_UI_HideLabelFilter_hiddenLabels_feature = Hidden Labels
+_UI_EdgeArrows_CirclePlus_literal = Circle Plus
+_UI_EdgeArrows_Dot_literal = Dot
+_UI_EdgeArrows_InputArrowWithDot_literal = Input Arrow With Dot
+_UI_EdgeArrows_DiamondWithDot_literal = Diamond With Dot
+_UI_EdgeArrows_FillDiamondWithDot_literal = Fill Diamond With Dot
+_UI_EdgeArrows_InputArrowWithDiamondAndDot_literal = Input Arrow With Diamond And Dot
+_UI_EdgeArrows_InputArrowWithFillDiamondAndDot_literal = Input Arrow With Fill Diamond And Dot
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/internal/part/DiagramEdgeEditPartOperation.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/internal/part/DiagramEdgeEditPartOperation.java
index 05153cb..cc98cc6 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/internal/part/DiagramEdgeEditPartOperation.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/internal/part/DiagramEdgeEditPartOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2021 THALES GLOBAL SERVICES and others.
+ * Copyright (c) 2007, 2021, 2023 THALES GLOBAL SERVICES and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
*
* Contributors:
* Obeo - initial API and implementation
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Bug 581287
*******************************************************************************/
package org.eclipse.sirius.diagram.ui.edit.internal.part;
@@ -69,7 +70,9 @@
import org.eclipse.sirius.diagram.ui.tools.internal.commands.EdgeRoutingStyleChangedCommand;
import org.eclipse.sirius.ecore.extender.business.api.permission.IPermissionAuthority;
import org.eclipse.sirius.ecore.extender.business.api.permission.PermissionAuthorityRegistry;
+import org.eclipse.sirius.ext.draw2d.figure.CirclePlusDecoration;
import org.eclipse.sirius.ext.draw2d.figure.PolygoneAndPolylineDecoraction;
+import org.eclipse.sirius.ext.draw2d.figure.PolygoneAndPolylineWithDotDecoration;
import org.eclipse.sirius.tools.api.SiriusPlugin;
import org.eclipse.sirius.ui.tools.api.color.VisualBindingManager;
import org.eclipse.sirius.viewpoint.RGBValues;
@@ -86,6 +89,11 @@
public static final PointList INVERSE_TRIANGLE_TIP = new PointList();
/**
+ * The diamond figure.
+ */
+ public static final PointList DIAMOND = new PointList();
+
+ /**
* A zoom error margin to determine if a bendpoint of a path exist. An error margin is needed because the zoom can
* modify coordinates.
*/
@@ -105,6 +113,11 @@
INVERSE_TRIANGLE_TIP.addPoint(1, -1);
INVERSE_TRIANGLE_TIP.addPoint(0, 0);
INVERSE_TRIANGLE_TIP.addPoint(1, 1);
+
+ DIAMOND.addPoint(0, 0);
+ DIAMOND.addPoint(-1, 1);
+ DIAMOND.addPoint(-2, 0);
+ DIAMOND.addPoint(-1, -1);
}
/**
@@ -305,6 +318,27 @@
case INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL:
result = DiagramEdgeEditPartOperation.createArrowInWithFillDiamond(self);
break;
+ case CIRCLE_PLUS_LITERAL:
+ result = DiagramEdgeEditPartOperation.createCirclePlus(self);
+ break;
+ case DOT_LITERAL:
+ result = DiagramEdgeEditPartOperation.createDot(self);
+ break;
+ case INPUT_ARROW_WITH_DOT_LITERAL:
+ result = DiagramEdgeEditPartOperation.createArrowInWithDot(self);
+ break;
+ case INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT_LITERAL:
+ result = DiagramEdgeEditPartOperation.createArrowInWithFillDiamondAndDot(self);
+ break;
+ case INPUT_ARROW_WITH_DIAMOND_AND_DOT_LITERAL:
+ result = DiagramEdgeEditPartOperation.createArrowInWithDiamondAndDot(self);
+ break;
+ case DIAMOND_WITH_DOT_LITERAL:
+ result = DiagramEdgeEditPartOperation.createDiamondAndDotDecoration(self);
+ break;
+ case FILL_DIAMOND_WITH_DOT_LITERAL:
+ result = DiagramEdgeEditPartOperation.createFillDiamondAndDotDecoration(self);
+ break;
default:
assert false;
result = null;
@@ -469,12 +503,7 @@
*/
public static PolygonDecoration createFillDiamondDecoration(final IDiagramEdgeEditPart self) {
final PolygonDecoration decoration = new PolygonDecoration();
- final PointList decorationPointList = new PointList();
- decorationPointList.addPoint(0, 0);
- decorationPointList.addPoint(-1, 1);
- decorationPointList.addPoint(-2, 0);
- decorationPointList.addPoint(-1, -1);
- decoration.setTemplate(decorationPointList);
+ decoration.setTemplate(DIAMOND);
decoration.setScale(6, 3);
DiagramEdgeEditPartOperation.applyLineWidth(decoration, self);
return decoration;
@@ -612,18 +641,126 @@
*/
private static RotatableDecoration createArrowInWithFillDiamond(IDiagramEdgeEditPart self) {
final PolygoneAndPolylineDecoraction decoration = new PolygoneAndPolylineDecoraction();
- final PointList decorationPointList = new PointList();
- decorationPointList.addPoint(0, 0);
- decorationPointList.addPoint(-1, 1);
- decorationPointList.addPoint(-2, 0);
- decorationPointList.addPoint(-1, -1);
- decoration.setTemplate(decorationPointList);
+ decoration.setTemplate(DIAMOND);
decoration.setScale(6, 3);
DiagramEdgeEditPartOperation.applyLineWidth(decoration, self);
return decoration;
}
/**
+ * Creates a circle with a plus decoration.
+ *
+ * @param self
+ * the edge edit part
+ * @return the new decoration
+ */
+ private static RotatableDecoration createCirclePlus(final IDiagramEdgeEditPart self) {
+ final CirclePlusDecoration decoration = new CirclePlusDecoration();
+ return decoration;
+ }
+
+ /**
+ * Creates a dot decoration.
+ *
+ * @param self
+ * the edge edit part
+ * @return the new decoration
+ */
+ private static RotatableDecoration createDot(final IDiagramEdgeEditPart self) {
+ final PolygoneAndPolylineWithDotDecoration decoration = new PolygoneAndPolylineWithDotDecoration();
+ decoration.setPolylineTemplate(new PointList()); // remove the arrow
+ decoration.setTemplate(new PointList()); // remove the diamond
+ DiagramEdgeEditPartOperation.applyLineWidth(decoration, self);
+ return decoration;
+ }
+
+ /**
+ * Creates an input arrow with a dot decoration.
+ *
+ * @param self
+ * the edge edit part
+ * @return the new decoration
+ */
+ private static RotatableDecoration createArrowInWithDot(IDiagramEdgeEditPart self) {
+ PolygoneAndPolylineWithDotDecoration decoration = new PolygoneAndPolylineWithDotDecoration();
+ decoration.setScale(6, 3);
+ DiagramEdgeEditPartOperation.applyLineWidth(decoration, self);
+ return decoration;
+
+ }
+
+ /**
+ * Creates an input arrow with diamond and dot decoration.
+ *
+ * @param self
+ * the edge edit part
+ * @return the new decoration
+ */
+ private static RotatableDecoration createArrowInWithDiamondAndDot(IDiagramEdgeEditPart self) {
+ PolygoneAndPolylineWithDotDecoration decoration = (PolygoneAndPolylineWithDotDecoration) createArrowInWithFillDiamondAndDot(self);
+ decoration.setBackgroundColor(ColorConstants.white);
+ DiagramEdgeEditPartOperation.applyLineWidth(decoration, self);
+ return decoration;
+ }
+
+ /**
+ * Creates an input arrow with fill diamond and dot decoration.
+ *
+ * @param self
+ * the edge edit part
+ * @return the new decoration
+ */
+ private static RotatableDecoration createArrowInWithFillDiamondAndDot(IDiagramEdgeEditPart self) {
+ PolygoneAndPolylineWithDotDecoration decoration = new PolygoneAndPolylineWithDotDecoration();
+ final PointList decorationPointList = DIAMOND.getCopy();
+ // translate the diamond to be able to display the dot
+ decorationPointList.translate(-1, 0);
+ decoration.setTemplate(decorationPointList);
+
+ PointList arrow = PolygoneAndPolylineDecoraction.TRIANGLE_TIP.getCopy();
+ arrow.translate(-1, 0);
+ decoration.setPolylineTemplate(arrow);
+
+ DiagramEdgeEditPartOperation.applyLineWidth(decoration, self);
+ return decoration;
+
+ }
+
+ /**
+ * Creates a diamond with dot decoration.
+ *
+ * @param self
+ * the edge edit part
+ * @return the new decoration
+ */
+ private static RotatableDecoration createDiamondAndDotDecoration(IDiagramEdgeEditPart self) {
+ PolygoneAndPolylineWithDotDecoration decoration = (PolygoneAndPolylineWithDotDecoration) createFillDiamondAndDotDecoration(self);
+ decoration.setBackgroundColor(ColorConstants.white);
+ DiagramEdgeEditPartOperation.applyLineWidth(decoration, self);
+ return decoration;
+ }
+
+ /**
+ * Creates a fill diamond with dot decoration.
+ *
+ * @param self
+ * the edge edit part
+ * @return the new decoration
+ */
+ private static RotatableDecoration createFillDiamondAndDotDecoration(IDiagramEdgeEditPart self) {
+ PolygoneAndPolylineWithDotDecoration decoration = new PolygoneAndPolylineWithDotDecoration();
+ decoration.setPolylineTemplate(new PointList()); // remove the arrow
+
+ final PointList decorationPointList = DIAMOND.getCopy();
+ // translate the diamond to be able to display the dot
+ decorationPointList.translate(-1, 0);
+
+ decoration.setTemplate(decorationPointList);
+ DiagramEdgeEditPartOperation.applyLineWidth(decoration, self);
+ return decoration;
+ }
+
+ /**
* Removes the node label from model children.
*
* @param self
@@ -706,7 +843,7 @@
*/
public static void refreshBendpointsWithPath(AbstractDiagramEdgeEditPart self, DEdge edge) {
RelativeBendpoints bendpoints = (RelativeBendpoints) ((Edge) self.getModel()).getBendpoints();
- List modelConstraint = bendpoints.getPoints();
+ List<?> modelConstraint = bendpoints.getPoints();
List<RelativeBendpoint> defaultFigureConstraint = new ArrayList<RelativeBendpoint>();
for (int i = 0; i < modelConstraint.size(); i++) {
org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint wbp = (org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint) modelConstraint.get(i);
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
index 99bc686..e8b70e27 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
@@ -13,7 +13,7 @@
<a href="#ReleaseNotesforSirius">Release Notes for Sirius</a>
<ol style="list-style: disc;">
<li>
- <a href="#sirius7.1.0">Changes in Sirius 7.1.0</a>
+ <a href="#sirius7.2.0">Changes in Sirius 7.2.0</a>
<ol style="list-style: disc;">
<li>
<a href="#UserVisibleChanges">User-Visible Changes</a>
@@ -27,18 +27,32 @@
</ol>
</li>
<li>
- <a href="#sirius7.0.4">Changes in Sirius 7.0.4</a>
+ <a href="#sirius7.1.0">Changes in Sirius 7.1.0</a>
<ol style="list-style: disc;">
<li>
<a href="#UserVisibleChanges2">User-Visible Changes</a>
</li>
+ <li>
+ <a href="#SpecifierVisibleChanges2">Specifier-Visible Changes</a>
+ </li>
+ <li>
+ <a href="#DeveloperVisibleChanges2">Developer-Visible Changes</a>
+ </li>
+ </ol>
+ </li>
+ <li>
+ <a href="#sirius7.0.4">Changes in Sirius 7.0.4</a>
+ <ol style="list-style: disc;">
+ <li>
+ <a href="#UserVisibleChanges3">User-Visible Changes</a>
+ </li>
</ol>
</li>
<li>
<a href="#sirius7.0.3">Changes in Sirius 7.0.3</a>
<ol style="list-style: disc;">
<li>
- <a href="#DeveloperVisibleChanges2">Developer-Visible Changes</a>
+ <a href="#DeveloperVisibleChanges3">Developer-Visible Changes</a>
</li>
</ol>
</li>
@@ -46,10 +60,10 @@
<a href="#sirius7.0.2">Changes in Sirius 7.0.2</a>
<ol style="list-style: disc;">
<li>
- <a href="#SpecifierVisibleChanges2">Specifier-Visible Changes</a>
+ <a href="#SpecifierVisibleChanges3">Specifier-Visible Changes</a>
</li>
<li>
- <a href="#DeveloperVisibleChanges3">Developer-Visible Changes</a>
+ <a href="#DeveloperVisibleChanges4">Developer-Visible Changes</a>
</li>
</ol>
</li>
@@ -57,23 +71,12 @@
<a href="#sirius7.0.1">Changes in Sirius 7.0.1</a>
<ol style="list-style: disc;">
<li>
- <a href="#DeveloperVisibleChanges4">Developer-Visible Changes</a>
- </li>
- </ol>
- </li>
- <li>
- <a href="#sirius7.0.0">Changes in Sirius 7.0.0</a>
- <ol style="list-style: disc;">
- <li>
- <a href="#UserVisibleChanges3">User-Visible Changes</a>
- </li>
- <li>
<a href="#DeveloperVisibleChanges5">Developer-Visible Changes</a>
</li>
</ol>
</li>
<li>
- <a href="#sirius6.6.0">Changes in Sirius 6.6.0</a>
+ <a href="#sirius7.0.0">Changes in Sirius 7.0.0</a>
<ol style="list-style: disc;">
<li>
<a href="#UserVisibleChanges4">User-Visible Changes</a>
@@ -84,10 +87,21 @@
</ol>
</li>
<li>
+ <a href="#sirius6.6.0">Changes in Sirius 6.6.0</a>
+ <ol style="list-style: disc;">
+ <li>
+ <a href="#UserVisibleChanges5">User-Visible Changes</a>
+ </li>
+ <li>
+ <a href="#DeveloperVisibleChanges7">Developer-Visible Changes</a>
+ </li>
+ </ol>
+ </li>
+ <li>
<a href="#sirius6.5.1">Changes in Sirius 6.5.1</a>
<ol style="list-style: disc;">
<li>
- <a href="#DeveloperVisibleChanges7">Developer-Visible Changes</a>
+ <a href="#DeveloperVisibleChanges8">Developer-Visible Changes</a>
</li>
</ol>
</li>
@@ -95,13 +109,13 @@
<a href="#sirius6.5.0">Changes in Sirius 6.5.0</a>
<ol style="list-style: disc;">
<li>
- <a href="#UserVisibleChanges5">User-Visible Changes</a>
+ <a href="#UserVisibleChanges6">User-Visible Changes</a>
</li>
<li>
- <a href="#SpecifierVisibleChanges3">Specifier-Visible Changes</a>
+ <a href="#SpecifierVisibleChanges4">Specifier-Visible Changes</a>
</li>
<li>
- <a href="#DeveloperVisibleChanges8">Developer-Visible Changes</a>
+ <a href="#DeveloperVisibleChanges9">Developer-Visible Changes</a>
</li>
</ol>
</li>
@@ -111,8 +125,22 @@
<p>This document contains the release notes for recent major releases of Sirius. See also
<a href="Release_Notes_Previous.html">the release notes from previous versions</a> for details about older releases.
</p>
- <h2 id="sirius7.1.0">Changes in Sirius 7.1.0</h2>
+ <h2 id="sirius7.2.0">Changes in Sirius 7.2.0</h2>
<h3 id="UserVisibleChanges">User-Visible Changes</h3>
+ <h3 id="SpecifierVisibleChanges">Specifier-Visible Changes</h3>
+ <ul>
+ <li><span class="label label-success">Added</span> New decorators are now available for the beginning and edge of edges:
+ <code>CirclePlus</code>,
+ <code>DiamondWithDot</code>,
+ <code>FillDiamondWithDot</code>,
+ <code>InputArrowWithDiamondAndDot</code>,
+ <code>InputArrowWithDot</code>,
+ <code>InputArrowWithFillDiamondAndDot</code>.
+ </li>
+ </ul>
+ <h3 id="DeveloperVisibleChanges">Developer-Visible Changes</h3>
+ <h2 id="sirius7.1.0">Changes in Sirius 7.1.0</h2>
+ <h3 id="UserVisibleChanges2">User-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> In a tree editor, if the
<code>Shift</code> key is pressed during using the
@@ -140,7 +168,7 @@
<li><span class="label label-info">Modified</span> The Sirius Session Details report (accessible with the “Properties” dialog on an aird file) is updated to always show the dependencies even for a not opened Session. The general dependencies are computed from serialized data. The image project dependencies are computed from the opened session or from the serialized data if the Session is not opened. A button is available to update image project dependencies.</li>
<li><span class="label label-info">Modified</span> The Copy action is now visible in the tabbar, of a diagram editor, when no diagram element is selected, before it was visible only when at least one diagram element is selected. And the drop-down menu for Paste actions is now visible in the tabbar, of a diagram editor, when at least one diagram element is selected, before it was visible only when no diagram element is selected. </li>
</ul>
- <h3 id="SpecifierVisibleChanges">Specifier-Visible Changes</h3>
+ <h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> The system property
<code>org.eclipse.sirius.ui.enableCreatedElementsConstraintInSelectElementsListener</code> has been added to allow to ignore the “created elements” constraint when the
@@ -159,7 +187,7 @@
<code>aql:input.getContextSelections()</code>.
</li>
</ul>
- <h3 id="DeveloperVisibleChanges">Developer-Visible Changes</h3>
+ <h3 id="DeveloperVisibleChanges2">Developer-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> The interface
<code>org.eclipse.sirius.ecore.extender.business.api.permission.IPermissionAuthority</code> now has a
@@ -261,24 +289,24 @@
</li>
</ul>
<h2 id="sirius7.0.4">Changes in Sirius 7.0.4</h2>
- <h3 id="UserVisibleChanges2">User-Visible Changes</h3>
+ <h3 id="UserVisibleChanges3">User-Visible Changes</h3>
<p>Minor release to avoid errors thrown during indirect deletion of edges whose label is selected (deletion done from outside the diagram editor or from a custom command).</p>
<h2 id="sirius7.0.3">Changes in Sirius 7.0.3</h2>
- <h3 id="DeveloperVisibleChanges2">Developer-Visible Changes</h3>
+ <h3 id="DeveloperVisibleChanges3">Developer-Visible Changes</h3>
<ul>
<li><span class="label label-danger">Removed</span> To ensure compatibility with Eclipse 2022-09, dependency to
<code>com.ibm.icu</code> has been removed.
</li>
</ul>
<h2 id="sirius7.0.2">Changes in Sirius 7.0.2</h2>
- <h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3>
+ <h3 id="SpecifierVisibleChanges3">Specifier-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> The variables
<code>edgeView</code> and
<code>otherEnd</code> are now also available during precondition evaluation of a reconnect tool. Before, these variables were available only during the reconnection tool execution.
</li>
</ul>
- <h3 id="DeveloperVisibleChanges3">Developer-Visible Changes</h3>
+ <h3 id="DeveloperVisibleChanges4">Developer-Visible Changes</h3>
<h4 id="Changesinorg.eclipse.sirius2">Changes in
<code>org.eclipse.sirius</code>
</h4>
@@ -306,7 +334,7 @@
</li>
</ul>
<h2 id="sirius7.0.1">Changes in Sirius 7.0.1</h2>
- <h3 id="DeveloperVisibleChanges4">Developer-Visible Changes</h3>
+ <h3 id="DeveloperVisibleChanges5">Developer-Visible Changes</h3>
<ul>
<li><span class="label label-info">Modified</span> The behavior concerning SVG images export has been improved. You can refer to
<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=578509">bugzilla 578509</a> for more details. This behavior is activated by default but you may disable it by setting the system property
@@ -315,7 +343,7 @@
</li>
</ul>
<h2 id="sirius7.0.0">Changes in Sirius 7.0.0</h2>
- <h3 id="UserVisibleChanges3">User-Visible Changes</h3>
+ <h3 id="UserVisibleChanges4">User-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> Some enhancement have been done about the images management.
<ul>
@@ -332,7 +360,7 @@
<li><span class="label label-info">Modified</span> It is now possible to move a regions container by moving one of its region with the “Ctrl” shortcut key pressed. In the same way, it is now possible to select a regions container by clicking on one of its region with the “Ctrl” shortcut key pressed.</li>
<li><span class="label label-danger">Removed</span> It is no longer possible to change the workspace image of a diagram element with an image from an internal plugin via the “Set style to workspace image” action. This functionality affects a very small part of the use cases. The new UI of the “Set style to workspace image” action does not support this advanced functionality. However, it is still possible to go through Properties > Style > Workspace Image, then paste the path of the internal plugin image.</li>
</ul>
- <h3 id="DeveloperVisibleChanges5">Developer-Visible Changes</h3>
+ <h3 id="DeveloperVisibleChanges6">Developer-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> Sirius core and dialects metamodels have been extracted in new
<b>.model</b> plugins with minimum dependencies. Each new plugin is re-exported by the plugin which was the previous container of its metamodel. The base packages of the generated code has not been modified. Each API modification is listed in the corresponding plugin section. Additional dialect providers and extension providers might have to modify the path or references to Sirius .ecore and .genmodel files to reflect this change. The new plugins are:
@@ -659,7 +687,7 @@
</li>
</ul>
<h2 id="sirius6.6.0">Changes in Sirius 6.6.0</h2>
- <h3 id="UserVisibleChanges4">User-Visible Changes</h3>
+ <h3 id="UserVisibleChanges5">User-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> 4 new actions have been added to control the “z-order” of edges. These actions are mainly useful in the context of
<a href="user/diagrams/Diagrams.html#Appearance">jump links</a>. Similar actions already existed for nodes but not for edges. A chapter dedicated to these new actions has been added in
@@ -667,7 +695,7 @@
</li>
<li><span class="label label-danger">Removed</span> To be coherent, the actions available “Diagram/Order” menu of Eclipse menu bar have been removed. Indeed, these actions are always visible but only valid for nodes. Now, only the contextual menus are to be used (for nodes or for edges).</li>
</ul>
- <h3 id="DeveloperVisibleChanges6">Developer-Visible Changes</h3>
+ <h3 id="DeveloperVisibleChanges7">Developer-Visible Changes</h3>
<h4 id="Changesinorg.eclipse.sirius.diagram3">Changes in
<code>org.eclipse.sirius.diagram</code>
</h4>
@@ -725,7 +753,7 @@
</li>
</ul>
<h2 id="sirius6.5.1">Changes in Sirius 6.5.1</h2>
- <h3 id="DeveloperVisibleChanges7">Developer-Visible Changes</h3>
+ <h3 id="DeveloperVisibleChanges8">Developer-Visible Changes</h3>
<h4 id="Migrations4">Migrations</h4>
<ul>
<li><span class="label label-info">Modified</span> The migration participant
@@ -734,7 +762,7 @@
</li>
</ul>
<h2 id="sirius6.5.0">Changes in Sirius 6.5.0</h2>
- <h3 id="UserVisibleChanges5">User-Visible Changes</h3>
+ <h3 id="UserVisibleChanges6">User-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> It is possible to override at the aird level both “Sirius/Do Refresh on representation opening” and “Sirius/Automatic refresh” preferences. To override the preferences, right-click on the
<code>aird</code> file, select “Properties”, and in the dialog go to the “Sirius settings” section. The preferences are stored in the project scope and associated to the aird file. For more details, refer the
@@ -744,7 +772,7 @@
<a href="user/general/SiriusSessionDetailedInformation.html">documentation</a> .
</li>
</ul>
- <h3 id="SpecifierVisibleChanges3">Specifier-Visible Changes</h3>
+ <h3 id="SpecifierVisibleChanges4">Specifier-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> A new
<code>CellEditor</code> tool is available for feature column mapping of edition table. It allows to define a specific
@@ -770,7 +798,7 @@
</ul>
</li>
</ul>
- <h3 id="DeveloperVisibleChanges8">Developer-Visible Changes</h3>
+ <h3 id="DeveloperVisibleChanges9">Developer-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> It is now possible to keep semantic element traceability during the representation export. For now, this option is only supported for diagram SVG export. In this case, a new attribute
<code>diagram:targetSemanticId</code> is added on SVG elements to reference the target semantic id on which the graphical element is based on. This option can be activated programmatically or by setting a preference. See the details below:
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
index bae1afe..94c492f 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
@@ -4,6 +4,16 @@
This document contains the release notes for recent major releases of Sirius. See also "the release notes from previous versions":Release_Notes_Previous.html for details about older releases.
+h2(#sirius7.2.0). Changes in Sirius 7.2.0
+
+h3. User-Visible Changes
+
+h3. Specifier-Visible Changes
+
+* <span class="label label-success">Added</span> New decorators are now available for the beginning and edge of edges: @CirclePlus@, @DiamondWithDot@, @FillDiamondWithDot@, @InputArrowWithDiamondAndDot@, @InputArrowWithDot@, @InputArrowWithFillDiamondAndDot@.
+
+h3. Developer-Visible Changes
+
h2(#sirius7.1.0). Changes in Sirius 7.1.0
h3. User-Visible Changes
diff --git a/plugins/org.eclipse.sirius.editor.diagram/src-gen/org/eclipse/sirius/diagram/editor/properties/sections/style/edgestyledescription/EdgeStyleDescriptionSourceArrowPropertySection.java b/plugins/org.eclipse.sirius.editor.diagram/src-gen/org/eclipse/sirius/diagram/editor/properties/sections/style/edgestyledescription/EdgeStyleDescriptionSourceArrowPropertySection.java
index 8fe5aad..b3a3a7c 100644
--- a/plugins/org.eclipse.sirius.editor.diagram/src-gen/org/eclipse/sirius/diagram/editor/properties/sections/style/edgestyledescription/EdgeStyleDescriptionSourceArrowPropertySection.java
+++ b/plugins/org.eclipse.sirius.editor.diagram/src-gen/org/eclipse/sirius/diagram/editor/properties/sections/style/edgestyledescription/EdgeStyleDescriptionSourceArrowPropertySection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2018 THALES GLOBAL SERVICES.
+ * Copyright (c) 2007, 2018, 2023 THALES GLOBAL SERVICES, CEA LIST.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
*
* Contributors:
* Obeo - initial API and implementation
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Bug 581287
*******************************************************************************/
package org.eclipse.sirius.diagram.editor.properties.sections.style.edgestyledescription;
@@ -84,37 +85,58 @@
List<ImageItem> result = new ArrayList<ImageItem>();
for (EdgeArrows edgeArrows : EdgeArrows.VALUES) {
if (edgeArrows.equals(EdgeArrows.NO_DECORATION_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/noDecoration.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/noDecoration.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.OUTPUT_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.OUTPUT_CLOSED_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputClosedArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputClosedArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_CLOSED_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputClosedArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputClosedArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.OUTPUT_FILL_CLOSED_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputFillClosedArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputFillClosedArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_FILL_CLOSED_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputFillClosedArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputFillClosedArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.DIAMOND_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/diamond.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/diamond.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.FILL_DIAMOND_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/fillDiamond.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/fillDiamond.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_DIAMOND_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithDiamond.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithDiamond.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithFillDiamond.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithFillDiamond.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.CIRCLE_PLUS_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/circlePlus.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/dot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithDot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.DIAMOND_WITH_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/diamondWithDot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.FILL_DIAMOND_WITH_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/fillDiamondWithDot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_DIAMOND_AND_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithDiamondAndDot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithFillDiamondAndDot.gif")); //$NON-NLS-1$
}
}
return result;
@@ -127,7 +149,7 @@
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
super.createControls(parent, tabbedPropertySheetPage);
- nameLabel.setFont(SiriusEditor.getFontRegistry().get("required"));
+ nameLabel.setFont(SiriusEditor.getFontRegistry().get("required")); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.sirius.editor.diagram/src-gen/org/eclipse/sirius/diagram/editor/properties/sections/style/edgestyledescription/EdgeStyleDescriptionTargetArrowPropertySection.java b/plugins/org.eclipse.sirius.editor.diagram/src-gen/org/eclipse/sirius/diagram/editor/properties/sections/style/edgestyledescription/EdgeStyleDescriptionTargetArrowPropertySection.java
index 179f342..74dc8c8 100644
--- a/plugins/org.eclipse.sirius.editor.diagram/src-gen/org/eclipse/sirius/diagram/editor/properties/sections/style/edgestyledescription/EdgeStyleDescriptionTargetArrowPropertySection.java
+++ b/plugins/org.eclipse.sirius.editor.diagram/src-gen/org/eclipse/sirius/diagram/editor/properties/sections/style/edgestyledescription/EdgeStyleDescriptionTargetArrowPropertySection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2018 THALES GLOBAL SERVICES.
+ * Copyright (c) 2007, 2018, 2023 THALES GLOBAL SERVICES, CEA LIST.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
*
* Contributors:
* Obeo - initial API and implementation
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Bug 581287
*******************************************************************************/
package org.eclipse.sirius.diagram.editor.properties.sections.style.edgestyledescription;
@@ -84,37 +85,58 @@
List<ImageItem> result = new ArrayList<ImageItem>();
for (EdgeArrows edgeArrows : EdgeArrows.VALUES) {
if (edgeArrows.equals(EdgeArrows.NO_DECORATION_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/noDecoration.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/noDecoration.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.OUTPUT_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.OUTPUT_CLOSED_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputClosedArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputClosedArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_CLOSED_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputClosedArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputClosedArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.OUTPUT_FILL_CLOSED_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputFillClosedArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/outputFillClosedArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_FILL_CLOSED_ARROW_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputFillClosedArrow.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputFillClosedArrow.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.DIAMOND_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/diamond.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/diamond.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.FILL_DIAMOND_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/fillDiamond.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/fillDiamond.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_DIAMOND_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithDiamond.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithDiamond.gif")); //$NON-NLS-1$
}
if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_FILL_DIAMOND_LITERAL)) {
- result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithFillDiamond.gif"));
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithFillDiamond.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.CIRCLE_PLUS_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/circlePlus.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/dot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithDot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.DIAMOND_WITH_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/diamondWithDot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.FILL_DIAMOND_WITH_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/fillDiamondWithDot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_DIAMOND_AND_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithDiamondAndDot.gif")); //$NON-NLS-1$
+ }
+ if (edgeArrows.equals(EdgeArrows.INPUT_ARROW_WITH_FILL_DIAMOND_AND_DOT_LITERAL)) {
+ result.add(new ImageItem(edgeArrows, "icons/full/decorator/inputArrowWithFillDiamondAndDot.gif")); //$NON-NLS-1$
}
}
return result;
@@ -127,7 +149,7 @@
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
super.createControls(parent, tabbedPropertySheetPage);
- nameLabel.setFont(SiriusEditor.getFontRegistry().get("required"));
+ nameLabel.setFont(SiriusEditor.getFontRegistry().get("required")); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.sirius.editor/icons/full/decorator/circlePlus.gif b/plugins/org.eclipse.sirius.editor/icons/full/decorator/circlePlus.gif
new file mode 100755
index 0000000..bdb07f1
--- /dev/null
+++ b/plugins/org.eclipse.sirius.editor/icons/full/decorator/circlePlus.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.editor/icons/full/decorator/diamondWithDot.gif b/plugins/org.eclipse.sirius.editor/icons/full/decorator/diamondWithDot.gif
new file mode 100755
index 0000000..e4191d0
--- /dev/null
+++ b/plugins/org.eclipse.sirius.editor/icons/full/decorator/diamondWithDot.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.editor/icons/full/decorator/dot.gif b/plugins/org.eclipse.sirius.editor/icons/full/decorator/dot.gif
new file mode 100755
index 0000000..78deb73
--- /dev/null
+++ b/plugins/org.eclipse.sirius.editor/icons/full/decorator/dot.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.editor/icons/full/decorator/fillDiamondWithDot.gif b/plugins/org.eclipse.sirius.editor/icons/full/decorator/fillDiamondWithDot.gif
new file mode 100755
index 0000000..6f4dabd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.editor/icons/full/decorator/fillDiamondWithDot.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithDiamondAndDot.gif b/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithDiamondAndDot.gif
new file mode 100755
index 0000000..b0cfba1
--- /dev/null
+++ b/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithDiamondAndDot.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithDot.gif b/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithDot.gif
new file mode 100755
index 0000000..7198bae
--- /dev/null
+++ b/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithDot.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithFillDiamondAndDot.gif b/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithFillDiamondAndDot.gif
new file mode 100755
index 0000000..505fea3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.editor/icons/full/decorator/inputArrowWithFillDiamondAndDot.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/figure/CirclePlusDecoration.java b/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/figure/CirclePlusDecoration.java
new file mode 100755
index 0000000..3a73ca0
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/figure/CirclePlusDecoration.java
@@ -0,0 +1,194 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2023 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Fadoi LAKHAL (CEA LIST) <Fadoi.Lakhal@cea.fr> - Initial API and implementation
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Bug 581287
+ *****************************************************************************/
+package org.eclipse.sirius.ext.draw2d.figure;
+
+import org.eclipse.draw2d.Ellipse;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.RotatableDecoration;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.draw2d.geometry.Transform;
+
+/**
+ * Use to create a circle plus decoration
+ * Adapted from Papyrus ContainmentDecoration class.
+ *
+ * @author flakhal
+ */
+public class CirclePlusDecoration extends Ellipse implements RotatableDecoration {
+
+ /** The default radius of the circle of the oval decoration */
+ private static final int RADIUS = 10;
+
+ private Point location;
+
+ private Transform transform;
+
+ private Point ovalCenter;
+
+ private Dimension ovalSize;
+
+ private double xScale = 1;
+
+ private double yScale = 1;
+
+ /**
+ * Constructor.
+ */
+ public CirclePlusDecoration() {
+ location = new Point();
+ transform = new Transform();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.draw2d.Figure#getBounds()
+ */
+ @Override
+ public Rectangle getBounds() {
+ if (bounds == null) {
+ updatePoints();
+
+ bounds = new Rectangle(location, new Dimension(0, 0));
+
+ Point p = Point.SINGLETON;
+ p.setLocation(ovalCenter);
+ p.x += ovalSize.width / 2;
+ p.y += ovalSize.height / 2;
+ bounds.union(p);
+ p.x -= ovalSize.width + 1; // +1 to avoid a truncated circle on the top of the circle
+ p.y -= ovalSize.height + 1; // +1 to avoid a truncated circle on the top of the circle
+ bounds.union(p);
+
+ bounds.expand(getLineWidth() / 2, getLineWidth() / 2);
+ }
+ return bounds;
+ }
+
+ /**
+ * Set the scale of the Oval. By default, the oval has a size of 10 per 10 : that is a circle !
+ *
+ * @param x
+ * the x-scale value
+ * @param y
+ * the y-scale value
+ */
+ public void setScale(double x, double y) {
+ ovalCenter = null;
+ ovalSize = null;
+ bounds = null;
+ transform.setScale(x, y);
+ xScale = x;
+ yScale = y;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.draw2d.Figure#setLocation(org.eclipse.draw2d.geometry.Point)
+ */
+ @Override
+ public void setLocation(Point p) {
+ ovalCenter = null;
+ ovalSize = null;
+ bounds = null;
+ location.setLocation(p);
+ transform.setTranslation(p.x, p.y);
+ super.setLocation(p);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.draw2d.RotatableDecoration#setReferencePoint(org.eclipse.draw2d.geometry.Point).
+ */
+ @Override
+ public void setReferencePoint(Point p) {
+ ovalCenter = null;
+ ovalSize = null;
+ bounds = null;
+ Point pt = Point.SINGLETON;
+ pt.setLocation(p);
+ pt.negate().translate(location);
+ setRotation(Math.atan2(pt.y, pt.x));
+ }
+
+ /**
+ * Set the rotation parameter.
+ *
+ * @param angle
+ * set the angle of the oval
+ */
+ public void setRotation(double angle) {
+ ovalCenter = null;
+ ovalSize = null;
+ bounds = null;
+ transform.setRotation(angle);
+ }
+
+ /**
+ * Update the points of the Circle.
+ */
+ protected void updatePoints() {
+ if (ovalSize == null) {
+ ovalSize = new Dimension((int) xScale * RADIUS * 2, (int) yScale * RADIUS * 2);
+ }
+ if (ovalCenter == null) {
+ ovalCenter = new Point(transform.getTransformed(new Point((int) -xScale * RADIUS, 0)));
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.draw2d.Figure#paintFigure(org.eclipse.draw2d.Graphics)
+ */
+ @Override
+ public void paintFigure(Graphics graphics) {
+ updatePoints();
+
+ graphics.pushState();
+ int oldLineWidth = graphics.getLineWidth();
+ graphics.setLineWidth(getLineWidth());
+ graphics.fillOval(ovalCenter.x - ovalSize.width / 2, ovalCenter.y - ovalSize.height / 2, ovalSize.width, ovalSize.height);
+ graphics.drawLine(ovalCenter.x - ovalSize.width / 2, ovalCenter.y, ovalCenter.x + ovalSize.width / 2, ovalCenter.y);
+ graphics.drawLine(ovalCenter.x, ovalCenter.y - ovalSize.width / 2, ovalCenter.x, ovalCenter.y + ovalSize.width / 2);
+ graphics.setLineWidth(oldLineWidth);
+
+ graphics.popState();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.draw2d.Figure#paintBorder(org.eclipse.draw2d.Graphics)
+ */
+ @Override
+ protected void paintBorder(Graphics graphics) {
+ updatePoints();
+
+ graphics.pushState();
+ int oldLineWidth = graphics.getLineWidth();
+ graphics.setLineWidth(getLineWidth());
+
+ graphics.drawOval(ovalCenter.x - ovalSize.width / 2, ovalCenter.y - ovalSize.height / 2, ovalSize.width, ovalSize.height);
+ graphics.setLineWidth(oldLineWidth);
+ graphics.popState();
+ }
+}
diff --git a/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/figure/PolygoneAndPolylineWithDotDecoration.java b/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/figure/PolygoneAndPolylineWithDotDecoration.java
new file mode 100755
index 0000000..3ae2ba7
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/figure/PolygoneAndPolylineWithDotDecoration.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2023 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.sirius.ext.draw2d.figure;
+
+import org.eclipse.draw2d.Ellipse;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+/**
+ * A rotatable, polygon shaped with arrow decoration and dot.
+ *
+ * @author Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr>
+ */
+public class PolygoneAndPolylineWithDotDecoration extends PolygoneAndPolylineDecoraction {
+
+ /**
+ * the radius of the dot
+ */
+ private static final int DOT_DIAMETER = 6;
+
+ /**
+ * the dot
+ */
+ private Ellipse dot;
+
+ /**
+ * Constructs a PolygoneAndPolylineDecoraction.
+ */
+ public PolygoneAndPolylineWithDotDecoration() {
+ super();
+ dot = new Ellipse();
+ dot.setSize(DOT_DIAMETER, DOT_DIAMETER);
+ dot.setFill(true);
+ add(dot);
+ dot.setLocation(new Point());
+
+ PointList arrow = TRIANGLE_TIP.getCopy();
+ arrow.translate(1, 0);
+ setPolylineTemplate(arrow);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ *
+ * @see org.eclipse.draw2d.Figure#paintChildren(org.eclipse.draw2d.Graphics.)
+ */
+ @Override
+ protected void paintChildren(Graphics graphics) {
+ // the only way I found to get the dot paint of the expected color (when the link is not in black!)
+ this.dot.setBackgroundColor(graphics.getForegroundColor());
+ super.paintChildren(graphics);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.draw2d.Polyline#getBounds()
+ */
+ @Override
+ public Rectangle getBounds() {
+ if (dot != null) {
+ Rectangle b = super.getBounds();
+ b.union(dot.getBounds());
+ return b;
+ } else {
+ return super.getBounds();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.draw2d.PolygonDecoration#setLocation(org.eclipse.draw2d.geometry.Point)
+ *
+ */
+ @Override
+ public void setLocation(Point p) {
+ super.setLocation(p);
+ Point ellipseLocation = new Point(p);
+ // initialize with an horizontal location
+ dot.setLocation(ellipseLocation.translate(new Point(-DOT_DIAMETER / 2, -DOT_DIAMETER / 2)));
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.draw2d.PolygonDecoration#setRotation(double)
+ *
+ */
+ @Override
+ public void setRotation(double angle) {
+ int translatationX = (int) (DOT_DIAMETER * Math.cos(angle));
+ int translationY = (int) (DOT_DIAMETER * Math.sin(angle));
+
+ dot.setLocation(new Point(dot.getLocation().x - translatationX / 2, dot.getLocation().y - translationY / 2));
+ super.setRotation(angle);
+ }
+}