Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF Editor without associated files(Wondering if GMF can handle directly accessing an EMF model)
GMF Editor without associated files [message #1070015] Wed, 17 July 2013 04:49 Go to next message
Phillip Drew is currently offline Phillip DrewFriend
Messages: 77
Registered: October 2012
Member
Basically I'm looking to migrate from a current solution where I store EMF and GMF files together to one using EMFStore.

Ideally the EMF store will be able to contain both the EMF model and the associated GMF model. EMFStore integrates with EMF Client Platform so that the EMF model can be easily edited however I'd also like users to be able to edit the model using a GMF diagram.

Couple of questions associated with that:

Are GMF models plain EMF models? (A.k.a. should there be any problems keeping them in EMFStore?)

Is it possible to programmatically create the GMF model for an EMF model with no files involved? (where normally in Eclipse a user would select the EMF model file and use the initialize diagram command)

Is it possible to open a GMF editor on a GMF & EMF model that are not stored in files?

Will there be syncing / saving issues having a GMF editor open on a GMF & EMF model that are not stored in files?

Thanks
Re: GMF Editor without associated files [message #1070040 is a reply to message #1070015] Wed, 17 July 2013 06:15 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 697
Registered: November 2009
Senior Member
Hi,

Quote:

Are GMF models plain EMF models? (A.k.a. should there be any problems keeping them in EMFStore?)


GMF Models are plain EMF models. You have two models when using EMF. One storing the domain information (semantic model) and one storing the diagram layout (notation model). You can ask gmf to put both into one file instead of two different files.

Quote:

Is it possible to programmatically create the GMF model for an EMF model with no files involved? (where normally in Eclipse a user would select the EMF model file and use the initialize diagram command)


I added this to the wiki yesterday. Take a look here: http://wiki.eclipse.org/Graphical_Modeling_Framework/Tips#Initialize_a_diagram_from_Java_code


Quote:

Is it possible to open a GMF editor on a GMF & EMF model that are not stored in files?


You can find information on how to do this here: http://wiki.eclipse.org/GMF_Archived_Newsgroup_Q_and_A#How_can_I_use_GMF_diagrams_without_using_files.3F You should, however, consider to not use the @generated not for you final version and prefer GMF's extension mechanisms like extension points or custom templates.


Quote:

Will there be syncing / saving issues having a GMF editor open on a GMF & EMF model that are not stored in files?


As long as both the emf and gmf editor work on the same model in memory no.

Ralph
Re: GMF Editor without associated files [message #1070419 is a reply to message #1070040] Wed, 17 July 2013 23:43 Go to previous message
Phillip Drew is currently offline Phillip DrewFriend
Messages: 77
Registered: October 2012
Member
Thanks for the prompt reply,

Creating the Diagram looks easy enough however I'm afraid I'm still a bit confused regarding opening an editor on it. The link you provided gives a good summary but I doubt I'm familiar enough with GMFs internals to figure that one out. Are there any examples for opening non-IFile diagrams that you're aware of?
Previous Topic:Specifying EJavaClass in Editor
Next Topic:Compartments in Phantom Nodes
Goto Forum:
  


Current Time: Sun Nov 23 03:49:46 GMT 2014

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

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