Figure Declarations

org.topcased.modeler.diagramconfigurator.figureDeclarations

0.5.0

When you create a Diagram Configuration, you define a mapping between the model objects and its graphical representation. The graphical representations are Draw2d figures but it could be useful to add its own figures. This extension point is used to extend the figure that represents the view of a model object. All the figures added to this extension point are now selectable in the combo box "Type" of a NodePartConfiguration. The generation produces a class that implements the selected figure and that is used as graphical representation of the model object.

<!ELEMENT extension (figureDeclaration+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT figureDeclaration (description?)>

<!ATTLIST figureDeclaration

name  CDATA #REQUIRED

class CDATA #REQUIRED>

Add a new extensible figure that can be used for the generated objects.



<!ELEMENT description (#PCDATA)>

A description of the Figure, explain how is drawn the shape and the different figures that compose it.



This example shows how a little man figure is added to the list of the extensible figures :
   

<extension point=

"org.topcased.modeler.editorconfigurator.figureDeclaration"

>

<figureDeclaration class=

"org.topcased.draw2d.figures.ManFigure"

name=

"Man"

>

<description>

A Figure that represent a Man with a head, a body, two arms and two legs!

</description>

</figureDeclaration>

</extension>

The class must implements the interface org.eclipse.draw2d.IFigure.

None