Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsGMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1014890/#msg_1014890
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
]]>Valerian Merkling2013-02-26T16:56:48-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1014906/#msg_1014906
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]]>Thomas Beyer2013-02-26T18:02:37-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1015041/#msg_1015041
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]]>Valerian Merkling2013-02-27T09:31:56-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1015051/#msg_1015051
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
]]>Thomas Beyer2013-02-27T10:01:07-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1015900/#msg_1015900
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 ..]]>Valerian Merkling2013-03-04T08:48:22-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1015923/#msg_1015923
if your model is persisted ok upon save, there is no need for gmf to write to the file on opening a diagram.
Quote:
The tooltip on the tab shows the absolute path of my file.
I don't really understand what you mean by that.
If you select any (diagram) file within the project-explorer-view, the Info-section of the property tab usually displays a system-absolute path (location) and workspace relative-path (path) at the same time.
Could you provide more information (maybe a small screenshot) of what you think is not correct in place?
Regards
Thomas]]>Thomas Beyer2013-03-04T09:39:43-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1016021/#msg_1016021
This case is on the creation of the diagram file, and every node i create here are succesfully save on the model files. Let's say it is Editor N°1
This case is when I open my diagram with a double clic on the file.
No nodes created here will be saved on the model. This one is editor N°2.
Event if i restart Eclipse, it's the same, Editor 1 is able to save correctly, and N°2 can't.
It mean that, if i want to work with my diagram, I must let Editor 1 open, if i close it, it's over
]]>Valerian Merkling2013-03-04T15:54:49-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1016047/#msg_1016047
this looks strange to me. Especially, I never encountered an editor tab displaying an absolute path of a model file.
Do you have your projects somewhere hostet, where I could take look at?
From your problem description I can't really figure out, what could be the problem.
Regards
Thomas]]>Thomas Beyer2013-03-04T17:39:05-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1016945/#msg_1016945
I made a new ecore model with only two EClass, and made a minimalist diagram editor with it.
And i have the same problem.
Two solutions :
- My eclipse version is corrupted
- I have a wrong step in my plug-in generation
I'm currently trying to re download eclipse.
Is there any place where i can download any diagram editor plug-ins ? I would be able to test them on my system and compare the content..
Regards,
Valerian]]>Valerian Merkling2013-03-08T09:51:21-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1016983/#msg_1016983
the GMF-Tooling SDK provides running examples.
You could import the example-plugin projects to your workbench and start from there.
Regards
Thomas]]>Thomas Beyer2013-03-08T13:28:26-00:00Re: GMF Saving issue
https://www.eclipse.org/forums/index.php/mv/msg/457477/1018654/#msg_1018654
Everything is ok now, thanks for your time Thomas !]]>Valerian Merkling2013-03-14T09:06:12-00:00