|Extending the Graphiti Metamodel [message #1110166]
||Mon, 16 September 2013 13:25
I would like to know which of these two solutions may be the good one to
extend the Graphiti Metamodel concepts from the package "pictograms".
For example, I want to introduce a new concept "MyCustomContainerShape"
which is a particular "ContainerShape" with new attributes and references.
I think about two solutions :
I - Extending the Graphiti Metamodel
In this solution, I choose to develop an extension of the Graphiti
Metamodel whith the new concept: MyCustomContainerShape
-> ContainerShape -> Shape (-> for extending).
Then, once the ecore created, I generate the code of my custom factory
with the gen model referencing the graphiti genmodel.
Finally, in my addFeature code, I use both the peCreateService and my
own factory to create either Shape / Container Shape or MyCustomContainer.
II - Creating a new uncoupled Metamodel
In my second solution, I choose to design a new metamodel with my new
Then, in my addFeature code, I create a ContainerShape, a
MyCustomContainerShape, and link the Container Shape to both the
MyCustomContainerShape and the BusinessObject. This gives the following
Business Object --- Pictogram Container Shape --- MyCustomContainerShape
(--- is a link) where :
- Business Object is my Business Object serialized in my Business Model
- Pictogram Container Shape is the Graphiti Container Shape serialized
in my Diagrame Resource ;
- MyCustomContainerShape is my new concept serialized in my Diagram
Resource, enhancing the Container Shape with attributes et references.
Is one of these two solutions may be implementable ?
Thanks in advance,
Powered by FUDForum
. Page generated in 0.29405 seconds