2 GMF Diagrams based on the same model at runtime [message #199466] |
Tue, 29 July 2008 22:42  |
Eclipse User |
|
|
|
Originally posted by: s.gil.gmx.com
Hi all,
I am currently working on a project in which I need to work in 2 or more GMF
diagrams which uses the same model (ecore).
The problem is that the second GMF diagram needs to define its elements
based on the result of the FIRST GMF diagram.
BUT even thought, both of them are running on the same eclipse, I cannot
access the elements created BY the first diagram on the second one.
(Both diagrams use the SAME ecore, and generated classes at runtime.).
Does anyone know how can I do that?
I think it is because both diagrams DO NOT persist the results on the same
"model" file (the result of a GMF diagram, is a diagram file which persists
the graphical things, and a "model file").
Is there a way to make 2 GMF diagrams persist its results on the same
"model" file?
Or is there a way to "import" the "model" results of 1 GMF diagram, into the
"model file" in the second diagram?
Any help appreciated.
Thanks in advance
|
|
|
|
|
|
|
Re: 2 GMF Diagrams based on the same model at runtime [message #199759 is a reply to message #199735] |
Fri, 01 August 2008 03:43  |
Eclipse User |
|
|
|
Hello Santiago,
> ill check the links, and try them in my project...
> but I what i need in my project is to persist the behaviour of the
> "Add
> Resource.." functionality (Which links the 2 diagram file).
> Is there a way i could make this link between the two diagrams
> permanent?
> either at runtime, programatically or modifying the .xml?
> thanks in advance.
You can load second diagram in generated ???DocumentProvider (see .createDocument()
method as an entry point). This is a place where Diagram instance is loaded
from EMF Resource, so you can load another instance there based on som information
you have concerning the link between these two diagrams. If you need to store
this knowledge in a notation model - try using DiagramLinkStyle for it.
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.12628 seconds