Home » Modeling » GMF (Graphical Modeling Framework) » GMF Saving issue(Work while testing, not in plug-in)
GMF Saving issue [message #1014890] |
Tue, 26 February 2013 16:56 |
Valerian Merkling Messages: 71 Registered: May 2011 |
Member |
|
|
Hi !
I recently made a little diagram editor with GMF, and everythings works fine as long as i run it as an eclipse app.
But when I make a plugin of it, and load it into my eclipse, i'm not able to save my work with the diagram editor anymore.
What i noticed :
No error in the eclipse error log.
Nothing in the .metadata/.log file
A few NLS unused message : XXXXYCreationTool_title in : messages warnings
Diagram only info are saved (resizing, moving node etc).
No Model modification saved : i can create a node, but when i reopen the diagram, it's gone.
If i create the node in the tree editor, then i can see it on the diagram, and in the position i made it before in the diagram.
Sometime, on a new diagram, the first node can be saved, but i wasn't able to reproduce yet.
I tried to regenerate all the code, and the problem is still here
Can anyone help me ?
Thanks !
Valerian
|
|
|
Re: GMF Saving issue [message #1014906 is a reply to message #1014890] |
Tue, 26 February 2013 18:02 |
Thomas Beyer Messages: 55 Registered: February 2013 |
Member |
|
|
Hi Valerian,
GMF usually generates plugins (like EMF does for the domain core, edit, editor and test suites) for your diagram editor code by default.
So how exactly are you deploying your plugins, resp. loading them into eclipse, as you are writing?
You might also want to provide some example of what you have so far, to help us find out, what is missing.
Usually setting up GMF as an rcp is a dependency management issue, that can be quickly resolved.
Another problem, as you are describing the missing nodes upon reopening the editor, could be a false setup of your domain-model persistence.
We'll get into that.
Regards Thomas
|
|
|
Re: GMF Saving issue [message #1015041 is a reply to message #1014890] |
Wed, 27 February 2013 09:31 |
Valerian Merkling Messages: 71 Registered: May 2011 |
Member |
|
|
Hi Thomas,
Here is how i run my diagram :
right clic on mysim.diagram project => run as => eclipse application
The diagram editor opened is able to save, everythings is fine.
Then I open mysim.diagram/plugin.xml and use the export wizard, i select all my projects (mysim, mysim.edit, mysim.editor, mysim.diagram) and export them as jar in my eclipse/plugins folders. After a restart eclipse is now able to manage *.mysim and *.mysim_diagram, but as i said, the diagram editor seems to be unable to write the model .mysim file.
The tree editor generated by the mysim.editor project works well, and is able to write *.mysim files.
How can i see if there is any dependencies problems ? The only things i know about RCP is its meaning
Is there any other information you need ?
Regards,
Valerian
|
|
|
Re: GMF Saving issue [message #1015051 is a reply to message #1015041] |
Wed, 27 February 2013 10:01 |
Thomas Beyer Messages: 55 Registered: February 2013 |
Member |
|
|
Hi Valerian,
there are actually two options to export the plugins.
The first one is the export as Archiv File in the Export Wizard's "General"-section, which is NOT, what you want. (it just archives your plugin-projects)
You want to use the export as Deployable plugin-ins and fragments in the "Plug-in Development" section.
If you haven't done that, please try this approach.
If you have done that, good. Narrows down the problem a bit more.
Check the build.properties-file for all your plugins (found in the root folder).
In the opened Build Configuration Editor, there should always be checked:
- folder META-INF and its contents
- folder icons (if available) and its contents
- messages.properties (for the diagram plugin)
- plugin.properties
- plugin.xml
If you browse the source of this file (there is tab at the bottom of the Build Configuration Editor "build.properties", your contents should something like this:
bin.includes = .,\
icons/,\
META-INF/,\
plugin.xml,\
plugin.properties
(and the stuff, you checked in the the other tab)
jars.compile.order = .
source.. = src/
output.. = bin/
Try this.
Regards Thomas
|
|
|
Re: GMF Saving issue [message #1015900 is a reply to message #1015051] |
Mon, 04 March 2013 08:48 |
Valerian Merkling Messages: 71 Registered: May 2011 |
Member |
|
|
Hi Thomas,
Based on what you said, i can't see any problem with my plugin, everythings look ok.
I also made a few new tests :
When i create a new .mysim_diagram file, i can create new nodes, and i can save them.
The tooltip on the tab shows the absolute path of my file.
If i close it and re-open it, the problem come again, and the tooltip shows the relative path.
To conclude, i'd say that when i re-open a diagram file, the editor is unable to write the model file (.mysim).
But i still have no idea about what is going on ..
|
|
| | | | | | |
Goto Forum:
Current Time: Tue Jan 14 00:51:43 GMT 2025
Powered by FUDForum. Page generated in 0.09340 seconds
|