Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » merging models
merging models [message #180017] Tue, 01 April 2008 06:58 Go to next message
Eclipse UserFriend
Originally posted by: marsha.rohrer.swisscom.com

Hi,

My editor should visualize several merged models (created with an other
editor). To do so I have registered my own ResourceFactory and implemented
a new GMFResource. The GMFResouce for the merged model creates an new XML
where all the needed files are merged using jdom. The structure that I get
can be initialized and visualized with the "Initialize .xxx_diagram
diagram file" action.
What I now want is to open that merged diagram directly in the editor
without having to go through the initialize action. I imangine to use the
XXXDiagramEditorUtil.createDiagram(diagramUri, modelUri, null) method. Now
I have the following questions / problems:
1. Can I use that method at all and what are the prerequisites?
2. How can I get the URI from my jdom Document in order to call that
method?
3. Or am I maybe on the wrong path and someone has a better idea?

Thank you for your help,
Marsha
Re: merging models [message #180149 is a reply to message #180017] Tue, 01 April 2008 14:44 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Marsha,

> 1. Can I use that method at all and what are the prerequisites?
You should be able to use this method - just try it.

> 2. How can I get the URI from my jdom Document in order to call that
> method?
AFAIU, you've registered your own resource factory for this "jdom" resource.
Just use appropriate URI to let this resource be loaded using your resource
factory.


> 3. Or am I maybe on the wrong path and someone has a better idea?
Why do you use your custom resource? It looks like you can use default EMF
storage + non-containment rereferece/cross-resource containment to store
the same information.

-----------------
Alex Shatalin
Re: merging models [message #180311 is a reply to message #180149] Wed, 02 April 2008 08:40 Go to previous message
Eclipse UserFriend
Originally posted by: marsha.rohrer.swisscom.com

Hi Alex,

Thank you for your answer.

>> 1. Can I use that method at all and what are the prerequisites?
> You should be able to use this method - just try it.

>> 2. How can I get the URI from my jdom Document in order to call that
>> method?
> AFAIU, you've registered your own resource factory for this "jdom" resource.
> Just use appropriate URI to let this resource be loaded using your resource
> factory.

Yes, I use my own resource factories for the model and the diagram. I open
the diagram by calling the IWorkbenchPage.openEditor method.

>> 3. Or am I maybe on the wrong path and someone has a better idea?
> Why do you use your custom resource? It looks like you can use default EMF
> storage + non-containment rereferece/cross-resource containment to store
> the same information.

I don't think so, since in my custom resource of the model I define how it
is merged from other files...Or could you explain me how in more detail?

Thank you,
Marsha
Previous Topic:Can GMF load eps images ?
Next Topic:Set fixed size for node
Goto Forum:
  


Current Time: Wed Apr 24 18:17:24 GMT 2024

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

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

Back to the top