Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Extending the Graphiti Metamodel
Extending the Graphiti Metamodel [message #1110166] Mon, 16 September 2013 13:25 Go to next message
Eclipse UserFriend
Hi there,

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
concept: MyCustomContainerShape.

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
scheme:


Business Object --- Pictogram Container Shape --- MyCustomContainerShape
(--- is a link) where :

- Business Object is my Business Object serialized in my Business Model
Resource ;
- 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,

Regards,

--
Nicolas H
Re: Extending the Graphiti Metamodel [message #1110323 is a reply to message #1110166] Mon, 16 September 2013 18:29 Go to previous messageGo to next message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
Yes, it is: http://5ise.quanxinquanyi.de/2012/12/13/the-way-we-use-graphiti/
Re: Extending the Graphiti Metamodel [message #1110670 is a reply to message #1110323] Tue, 17 September 2013 06:55 Go to previous messageGo to next message
Eclipse UserFriend
Le 16/09/13 20:29, Andreas Graf a écrit :
> Yes, it is:
> http://5ise.quanxinquanyi.de/2012/12/13/the-way-we-use-graphiti/


Hi,

Thanks a lot,

This is exactly what I was looking for and I was hoping that the
metamodel extension solution was better solution than adding link with
an uncoupled metamodel.

Regards,

--
Nicolas H
Re: Extending the Graphiti Metamodel [message #1816876 is a reply to message #1110670] Sat, 09 November 2019 16:39 Go to previous message
Marek Jagielski is currently offline Marek JagielskiFriend
Messages: 97
Registered: April 2012
Member
The link given seems not working anymore. Does someone could describe a solution here?

Regards,

Marek

[Updated on: Sun, 10 November 2019 13:51]

Report message to a moderator

Previous Topic:how can get all business object from diagram
Next Topic:Online Help (Documentation) has disappeared
Goto Forum:
  


Current Time: Thu Oct 03 20:29:49 GMT 2024

Powered by FUDForum. Page generated in 0.04105 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top