Diagrams
Identifier:
org.topcased.modeler.diagrams
Since:
0.8.0
Description:
You can easily extends an existing Topcased graphical editor by providing a new or a custom diagram.
This extension point is used to extend the available diagrams that can be associated with a model object.
All the diagrams added to this extension point are now available each time a valid model object is selected (from the outline or directly from the editing window).
Configuration Markup:
<!ELEMENT extension (diagram*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT diagram (enableFor+)>
<!ATTLIST diagram
id CDATA #REQUIRED
name CDATA #REQUIRED
configuration CDATA #REQUIRED
icon CDATA #IMPLIED
editorID CDATA #IMPLIED>
Add a new diagram that will be available depending on the selected model object.
- id - The id of the diagram.
- name - The name of the diagram. This is the text that will be displayed in the contextual menu.
- configuration - The IConfiguration to associate with the Diagram. It must be a subclass of org.topcased.modeler.editor.IConfiguration.
- icon - The icon representing the diagram. It will be used in the model navigator and in menus.
- editorID - Specify the editorID that should be able to manage this type of diagram. When omitted, only the enableFor condition is checked.
<!ELEMENT enableFor EMPTY>
<!ATTLIST enableFor
class CDATA #REQUIRED
creationCommand CDATA #IMPLIED>
Define which are the valid container for a such diagram type
- class - The EObject on which it is possible to create this Diagram. It must be a subclass of org.eclipse.emf.ecore.EObject.
- creationCommand - A custom command that could be used to perform the diagram creation. This command is optionnal and should be used only when the diagram is not created directly under the model object of the enableFor element. It must be a subclass of org.eclipse.gef.commands.Command and implements the org.topcased.modeler.extensions.ICreationDiagram interface.
Examples:
This example shows how to define the Diagram that can be associated with an EPackage model object in the graphical Ecore editor :
<extension point=
"org.topcased.modeler.diagrams"
>
<diagram configuration=
"org.topcased.modeler.ecore.ediagram.EcoreConfiguration"
id=
"org.topcased.modeler.ecore.ediagram"
name=
"Ecore Diagram"
>
<enableFor class=
"org.eclipse.emf.ecore.EPackage"
/>
</diagram>
</extension>
API Information:
The configuration must implements the interface org.topcased.modeler.editor.IConfiguration.
The class of the "enableFor" must implements the interface org.eclipse.emf.ecore.EObject.
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