Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » problem with opening another diagram file - BUG?
problem with opening another diagram file - BUG? [message #89533] Thu, 04 January 2007 18:12 Go to next message
Eclipse UserFriend
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 #89611 is a reply to message #89533] Fri, 05 January 2007 05:49 Go to previous messageGo to next message
Eclipse UserFriend
Hello Wiktor,

Did you changed generated code?

> Best would be not to use any diagram file (only open it by clicking
> on model file without notation informations inside)
Dig this newsgroup - there was a questions about the possibility to create
diagram file on the fly. In addition you can put diagram into the model file
by specifying corresponding option in .gmfgen model.

-----------------
Alex Shatalin
Re: problem with opening another diagram file - BUG? [message #92484 is a reply to message #89611] Sun, 14 January 2007 18:57 Go to previous messageGo to next message
Eclipse UserFriend
Hi

I have been changing this generated code for 3 months already:)

I couldn't found this thread about creating diagram on the fly (I found
only one, but it was not exactly what i need).

I 've just tried to generate my plugin with single file flag.
But the problem is still the same.
When I open second file with my diagramEditor it has model elements from
the first one (even if 1st one is now closed). of course in text editor
it has empty content.

which elements are static, or which one are still alive, and keep this
state?


And how to not save all notations elements in my single file?

Many thanx for your help

Wiktor


Alex Shatalin napisał(a):
> Hello Wiktor,
>
> Did you changed generated code?
>> Best would be not to use any diagram file (only open it by clicking
>> on model file without notation informations inside)
> Dig this newsgroup - there was a questions about the possibility to
> create diagram file on the fly. In addition you can put diagram into the
> model file by specifying corresponding option in .gmfgen model.
>
> -----------------
> Alex Shatalin
>
>
Re: problem with opening another diagram file - BUG? [message #92796 is a reply to message #92484] Mon, 15 January 2007 11:47 Go to previous message
Eclipse UserFriend
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
Previous Topic:Status of M4?
Next Topic:Decorator provider problem
Goto Forum:
  


Current Time: Mon Jun 02 20:46:29 EDT 2025

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

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

Back to the top