Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Splitting a model into different files
Splitting a model into different files [message #426509] Fri, 09 January 2009 12:44 Go to next message
Eclipse UserFriend
Originally posted by: csaad.gmx.net

Hi,

We have a graphical editor based on GEF with an underlying EMF model. In
order to store the layout information additional elements have been added
to the metamodel like the position and size of visible objects.
It is currently planned to remove this view specific information from the
model so that it will contain only the relevant domain.
The idea is to leave the view classes in the metamodel but to split up the
instances of the model into two different files: One that contains the
domain elements and one with the view objects (which are linked to the
domain elements through a containment reference). Is there a way to
achieve this, e.g. by telling EMF to put elements of a given type in
another resource?

Thanks for your help,
Chris
Re: Splitting a model into different files [message #426512 is a reply to message #426509] Fri, 09 January 2009 13:47 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Chris,

Comments below.


C. Saad wrote:
> Hi,
>
> We have a graphical editor based on GEF with an underlying EMF model.
> In order to store the layout information additional elements have been
> added to the metamodel like the position and size of visible objects.
Those should probably be outside the model. GMF uses the Notation model
for this type of thing.
> It is currently planned to remove this view specific information from
> the model so that it will contain only the relevant domain.
There you go. :-P
> The idea is to leave the view classes in the metamodel but to split up
> the instances of the model into two different files: One that contains
> the domain elements and one with the view objects (which are linked to
> the domain elements through a containment reference). Is there a way
> to achieve this, e.g. by telling EMF to put elements of a given type
> in another resource?
You have to put them in another resource yourself explicitly, but most
certainly this is possible. GMF does exactly this. You just need a
second notation model with references to the domain model and then store
them in two separate resources (just like the GenModel and the Ecore
model are separated).
>
> Thanks for your help,
> Chris
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:reflection: accessing UML classes from (instance) EObject?
Next Topic:Building a "delta model" using ECoreUtil.copy
Goto Forum:
  


Current Time: Fri Apr 26 02:52:15 GMT 2024

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

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

Back to the top