problem with opening another diagram file - BUG? [message #89533] |
Thu, 04 January 2007 18:12  |
Eclipse User |
|
|
|
My scenario:
1. create model file using emf editor
2. create some elements
3. initialize diagram file and gmf editor is opened
4. close files
5. copy emf model file
6. open copied file in emf editor and make some changes
7. initialize diagram file for second model file
8. open new diagram file - and I see my first model!
9. restart eclipse & open second diagram -> I see my second model !
I need to open one editor per model, each one working independently.
Best would be not to use any diagram file (only open it by clicking on
model file without notation informations inside)
Thanx for help
Wiktor
|
|
|
|
|
Re: problem with opening another diagram file - BUG? [message #92796 is a reply to message #92484] |
Mon, 15 January 2007 11:47  |
Eclipse User |
|
|
|
Hello Wiktor,
> I have been changing this generated code for 3 months already:)
What I mean: did you change something concerning resource loading/unloding/ResourceSet
caching? Looks like two different diagrams are using the same resource set
cached somewhere in your runtime instance and looks like this is a result
of code modification - generated by GMF code should not cache anything. Otherwise
it's a bug. ;-)
> I couldn't found this thread about creating diagram on the fly (I
> found only one, but it was not exactly what i need).
This thread is about similar problem: http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg02265.html
In general, if you don’t need to store diagram file you should implement
your own ResourceFactory and register it for the diagram file extension.
As a result, your implementation will be responsible for saving content and
can simply do nothing here.
In addition here is a newsgroup question concerning your problem with more
complicated answer: http://wiki.eclipse.org/index.php/GMF_Archived_Newsgroup_Q%2 6A#How_can_I_work_with_a_domain_model_in_a_diagram.2C_but_no t_maintain_a_diagram_file.3F
> which elements are static, or which one are still alive, and keep this
> state?
Looks like two different diagrams are sharing the same Resources -> ResourceSet.
> And how to not save all notations elements in my single file?
Well, you can use “single file flag” for it. Does it works?
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.02857 seconds