Figure Declarations
Identifier:
org.topcased.modeler.diagramconfigurator.figureDeclarations
Since:
0.5.0
Description:
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.
Configuration Markup:
<!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.
- name - The user-friendly name of the figure.
- class - The class for the figure. It must implement org.eclipse.draw2d.IFigure.
<!ELEMENT description (#PCDATA)>
A description of the Figure, explain how is drawn the shape and the different figures that compose it.
Examples:
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>
API Information:
The class must implements the interface org.eclipse.draw2d.IFigure.
Supplied Implementation:
None
Copyright (c) 2005, 2006 AIRBUS FRANCE and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html