Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Valerian Merkling is currently offline Valerian MerklingFriend
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 Sad

Can anyone help me ?

Thanks !

Valerian



Re: GMF Saving issue [message #1014906 is a reply to message #1014890] Tue, 26 February 2013 18:02 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
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 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian MerklingFriend
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 Embarrassed

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 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
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 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian MerklingFriend
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 ..
Re: GMF Saving issue [message #1015923 is a reply to message #1015900] Mon, 04 March 2013 09:39 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Member
Hi Valerian,

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
Re: GMF Saving issue [message #1016021 is a reply to message #1015923] Mon, 04 March 2013 15:54 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian MerklingFriend
Messages: 71
Registered: May 2011
Member
Here are the screenshots

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
index.php/fa/13668/0/


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.

index.php/fa/13669/0/

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 Sad


  • Attachment: it works.JPG
    (Size: 9.97KB, Downloaded 593 times)
  • Attachment: wont work.JPG
    (Size: 6.84KB, Downloaded 618 times)
Re: GMF Saving issue [message #1016047 is a reply to message #1016021] Mon, 04 March 2013 17:39 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Member
Hi Valerian,

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
Re: GMF Saving issue [message #1016945 is a reply to message #1016047] Fri, 08 March 2013 09:51 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian MerklingFriend
Messages: 71
Registered: May 2011
Member
Hi Thomas.

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
Re: GMF Saving issue [message #1016983 is a reply to message #1016945] Fri, 08 March 2013 13:28 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Member
Hi Valerian,

the GMF-Tooling SDK provides running examples.
You could import the example-plugin projects to your workbench and start from there.

Alternatively, you could clone GMF Toolings' Git-Repository from
git://git.eclipse.org/gitroot/gmf-tooling/org.eclipse.gmf-tooling.git
There is an examples-folder that should provide what you are searching at source code level.

Regards
Thomas
Re: GMF Saving issue [message #1018654 is a reply to message #1016983] Thu, 14 March 2013 09:06 Go to previous message
Valerian Merkling is currently offline Valerian MerklingFriend
Messages: 71
Registered: May 2011
Member
I feel a bit stupid but all of this come from the anciently checked "Generate RCP application" while I generated the gmfgen ...

Everything is ok now, thanks for your time Thomas !
Previous Topic:ERROR IN GMF
Next Topic:GMF vs MegaEdit+
Goto Forum:
  


Current Time: Sat Apr 20 08:04:28 GMT 2024

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

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

Back to the top