Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Is a metamodel without a root node supported ?
Is a metamodel without a root node supported ? [message #189738] Wed, 28 May 2008 12:48 Go to next message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

Hi!

I have a metamodel described with UML profiles (transformation to an ecore
model is handeled) but there is no root node in my metamodel.

Do i have to create a new node that will be the parent of all others
through a containment reference ?
If so it is quite restrictive, no ? All metamodels do not have this tree
structure with root node and a lot of containment refrences.

Thanks for your answers
Re: Is a metamodel without a root node supported ? [message #189786 is a reply to message #189738] Wed, 28 May 2008 14:56 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Mous,

> Do i have to create a new node that will be the parent of all others
> through a containment reference ? If so it is quite restrictive, no ?
Yes.

> All metamodels do not have this tree structure with root node and a
> lot of containment refrences.
Where do you store elements of your model? (EObject.eContainer() == ?)

-----------------
Alex Shatalin
Re: Is a metamodel without a root node supported ? [message #190073 is a reply to message #189786] Thu, 29 May 2008 12:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

You are always here to lighten up my way Alex! Thanks...

Ok, i will create this node!

I don't know how to answer your question. Probably, because i don't know
what is lying behind but i will give it a try.

As far as I know they are stored in the model Package. Some of them have a
container class.
Is this the information you are asking for?

To be more precise. I asked because when i tried to create the gmfmap it
asks me to precise a node and this node will give access to top nodes that
will have child nodes. But i have plenty of nodes at the first level
without any container. So I have to create an editor for every node or
create a "top-top" node.
Re: Is a metamodel without a root node supported ? [message #190081 is a reply to message #190073] Thu, 29 May 2008 12:52 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Mous,

> As far as I know they are stored in the model Package. Some of them
> have a container class.
> Is this the information you are asking for?
In general yes. :-)

If you create a diagram node on GMF-generated diagram GMF is responsible
for creating corresponding notation (visual) model element and put it into
the diagram file + create underlying domain model element and attach this
element to the corresponding container. Each domain model element is EObject
and should be attached to a container (or stored directly in EMF resource)
to be persisted (stored on disk + correctly loaded next time).

Currently GMF-generated diagrams do top-level diagram element creation on
creating new diagram + attach this newly created domain element to the appropriate
EMF resource. All the other diagram elements will be created inside this
top-level container and so stored in the same EMF resource.
If in your situation domain model will have different structure (some diagram
nodes will reside in different/own EMF resources) then you still can support
this situation with GMF-generated diagrams but you should be ready for manual
code/template modifications + you have to know where all the diagram elements
should be stored. This is why I’m asking you about containment tree in your
model.

I suggest you to create sample model structure which you’d like to edit in
GMF-generated diagram by EMF-generated tree editor to see where each diagram
node should be stored in this situation.

> nodes that will have child nodes. But i have plenty of nodes at the
> first level without any container. So I have to create an editor for
Should these nodes be stored directly in the root of domain model resource
or in different resources?. By default GMF does not support this kind of
persistence…

HTH if you have any other particular questions do not hesitate to ask me.
-----------------
Alex Shatalin
Re: Is a metamodel without a root node supported ? [message #190447 is a reply to message #190081] Mon, 02 June 2008 07:27 Go to previous message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

Thanks for the description of the inner work on the "GMF machine". Now
that i have a permission i will not hesitate! :D
Previous Topic:Weird OpenDiagram behavior
Next Topic:Arrange diagram elements
Goto Forum:
  


Current Time: Fri Apr 26 22:27:07 GMT 2024

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

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

Back to the top