merging models [message #180017] |
Tue, 01 April 2008 06:58 |
Eclipse User |
|
|
|
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 #180311 is a reply to message #180149] |
Wed, 02 April 2008 08:40 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02849 seconds