Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » partitioning or subdiagram problem(IResourceChangeListener and model synchronisation issu)
icon5.gif  partitioning or subdiagram problem [message #633114] Fri, 15 October 2010 12:13 Go to next message
AlexejS Mising name is currently offline AlexejS Mising nameFriend
Messages: 25
Registered: May 2010
Junior Member
Hello Community,

I added to my gmfmap and gmfgen necessary settings to get OpenDiagramEditPolicy when I doublecklick on an element. That works fine.
But there is a curious behavior: after doubleklick I open a new diagram and add new elements from the toolpalette and press save and close the diagram.
Now, when I move a element on the main diagram and press save, and after open the subdiagram again - all elements are lost in the subdiagram!? Why?

How can I solve this problem? Please help Smile thx

[Updated on: Sat, 16 October 2010 11:05]

Report message to a moderator

Re: partitioning or subdiagram problem [message #633126 is a reply to message #633114] Fri, 15 October 2010 13:09 Go to previous messageGo to next message
AlexejS Mising name is currently offline AlexejS Mising nameFriend
Messages: 25
Registered: May 2010
Junior Member
I tested it out with an older version of my editor - there it works fine.
When I close the subdiagram there apear a dialog "The File has be changed on the Filesystem, do you want load the changes" I choose yes and everything works.

But in my new version, this dialog does not appear, why? thx
Re: partitioning or subdiagram problem [message #633187 is a reply to message #633126] Fri, 15 October 2010 15:28 Go to previous messageGo to next message
AlexejS Mising name is currently offline AlexejS Mising nameFriend
Messages: 25
Registered: May 2010
Junior Member
This problem occures, because I save my diagram in a project in my workspace, but I do something wrong, so my diagram doesn't recognize changes on filesystem. How to correct this? Thx
Re: partitioning or subdiagram problem [message #633317 is a reply to message #633187] Sat, 16 October 2010 11:04 Go to previous message
AlexejS Mising name is currently offline AlexejS Mising nameFriend
Messages: 25
Registered: May 2010
Junior Member
No I'm a step further.

I got this behavior because I use the Eclipse Resource API, so now I have to implement a Resourcelistener for my diagram like:

IWorkspace workspace = ResourcesPlugin.getWorkspace();
   IResourceChangeListener listener = new IResourceChangeListener() {
      public void resourceChanged(IResourceChangeEvent event) {
         System.out.println("Something changed!");
      }
   };
   workspace.addResourceChangeListener(listener);

   //... some time later one ...
   workspace.removeResourceChangeListener(listener);




described here: http:// www.eclipse.org/articles/Article-Resource-deltas/resource-de ltas.html

so I did, and it works fine.

But how can I perform a model-file synchronisation on my diagram in gmf? Thx
Previous Topic:Intalling GMF 2.1.3 In Eclipse 3.5
Next Topic:Persisiting the diagram state after reopening the diagram file
Goto Forum:
  


Current Time: Fri Apr 19 09:42:56 GMT 2024

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

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

Back to the top