Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » gmf diagram file stops writing to model xml file (diagram is a RCP app and also Eclipse plugin)(gmf diagram file not writing to model xml file (in an unpredictable manner))
gmf diagram file stops writing to model xml file (diagram is a RCP app and also Eclipse plugin) [message #507045] Mon, 11 January 2010 19:19 Go to next message
Vineet is currently offline VineetFriend
Messages: 19
Registered: July 2009
Junior Member
A quick summary...
For my gmf based diagram editor, I have created an RCP application and eclipse plugins.
The diagram file is separate from the backing domain model file.
My users are expected to edit the diagram file either through the RCP app or they can install eclipse plugins to work on the diagram.

Here is the weirdness.....
It works 90% of the time. i.e I can edit the diagram file in RCP app, then close the RCP app and edit the file in Eclipse with appropriate plugins.
But after 15 or 20 edits, the Eclipse plugin based editor stops writing to the backing domain model file. Every time I open the diagram file, it shows that the file is dirty and needs to be saved (since the nodes I created exist in the diagram file but not in the model file....and I assume the view is created in sync with diagram and model files).
The RCP app keeps on working as expected. Everything created through the diagram file is written to the backing model file.

Re: gmf diagram file stops writing to model xml file (diagram is a RCP app and also Eclipse plugin) [message #507292 is a reply to message #507045] Tue, 12 January 2010 18:55 Go to previous messageGo to next message
Vineet is currently offline VineetFriend
Messages: 19
Registered: July 2009
Junior Member
I guess I did not ask the right question above Sad

1. Where is the touchpoint in gmf code where it writes to the backing model file?

If I can find that, then I can debug from there on.....
I tried debugging in "AbstractTransactionalCommand" class but it seems the diagram file is quite aware of the baking model file.
I am guessing it's the "save" operation which is failing silently (I did not see any logging statements) that I need to debug.

thanks.
Re: gmf diagram file stops writing to model xml file (diagram is a RCP app and also Eclipse plugin) [message #507305 is a reply to message #507045] Tue, 12 January 2010 21:30 Go to previous message
Vineet is currently offline VineetFriend
Messages: 19
Registered: July 2009
Junior Member
so at this point I an hoping someone will find this useful.....

The problem is not between the RCP and plugin version. The problem is how the diagram file is opened.
In the RCP version, since there is no project explorer, the only way to open the file is through "File->Open" menu.
In the Eclipse plugin version, I could open the diagram file either using the "File->Open" or simply double clicking on the file through project explorer view.
If the diagram file is opened using the "File->Open" sequence, then everything works. If it is opened by double clicking the diagram file, it somehow seems to get "disconnected" from the backing model file and does not write to it.

Now I am 125% sure that this was not happening in previous versions of GMF (I just upgraded to 2.2, hence all this). I have my diagram editor running in the previous version and everything works irrespective of how the diagram file is opened.

[Updated on: Tue, 12 January 2010 22:00]

Report message to a moderator

Previous Topic:create connection programmatically
Next Topic:Fix connection anchor when resizing source/target figure
Goto Forum:
  


Current Time: Tue Apr 23 13:52:34 GMT 2024

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

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

Back to the top