Currently I'm thinking about implementing my first Graphiti editor. I have consulted the documentation of
Graphiti, and also the tutorial given within it.
It is explained these points :
- How does Graphiti work.
- For the tutorial there is Implementation of a Diagram type provider, feature provider and features
But, What is unclear is how can I deal to build my own tool, based in my Ecore Model as domain model??
Really, I don't know how to start? and what type of project should I select?
Michael Wenz Messages: 1790 Registered: July 2009 Location: Walldorf, Germany
You can start as desrcibed in the written tutorial, defining your diagram type and diagram type provider in plugin.xml and implementing your diagram type provider, feature provider and features. Referencing your model should be simply replacing references to EMF ecore model (and its plugin) with yout model.
Thank you Michael.
I know this.
What I want to understand is
But, what type of project select when launching Eclipse ? Is it a simple java project, in which, I import the Graphiti libraries in a first step, and I create my sources and the file pluguin.xml in a second step?
If you are using an EMF based metamodel you can simply make reference to it as an import in the your feature definitions. The tutorial uses EClass. Essentially you will need to define features for each element in your model.
For instance if you have a model:
with an element
you would define a CreateXelemFeature class (and AddXelemFeature and so on). Instead of an EClass object you would create an Xelem object...