Extending EcoreTools with new EAnnotation-based layers [message #1697795] |
Mon, 08 June 2015 10:07  |
Eclipse User |
|
|
|
Hi everyone,
I am working on an application based on an Ecore model heavily using EMF annotations (EAnnotation), as the former versions of this model were UML models using stereotypes. The people in charge of the model would like to be able to edit these annotations directly from the Ecore editor.
I would like to add extra layers to the EcoreTools editor, such as the Documentation or Constraint layer but with my own annotation names.
What would be the best way to achieve this ?
* Is there an EcoreTools extension point enabling to add such extensions ?
* Is it better to extend EcoreTools's VSM in my own .odesign file, which would be used for Ecore visualisation/edition ?
* Another way ?
Thanks in advance for your replies,
François
|
|
|
Re: Extending EcoreTools with new EAnnotation-based layers [message #1701733 is a reply to message #1697795] |
Wed, 15 July 2015 05:47  |
Eclipse User |
|
|
|
Hi,
you can define an extension which can contribute a Layer (with Mappings) and Tools through another plugin (use the Viewpoint Specification Project wizard to create it).
Almost everything happens in the .odesign file, name your Group, Viewpoint then a DiagramExtension which can specify the contributed layers and mappings.
Once this is done, a user has to explicitely enable your Viewpoint (and might have to enable your layer -- depending on the default enablement status of your layer) the EcoreTools diagram editor will then adapt its behavior.
There is an example of that in ecore.odesign with the "Archetype" Viewpoint which adds style customizations and new tools. You can do the same from another plugin.
|
|
|
Powered by
FUDForum. Page generated in 0.04774 seconds