Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Best place to update model content programatically
Best place to update model content programatically [message #147875] Mon, 27 August 2007 04:50
Eclipse UserFriend
Hi,

I've got 2 diagram editors, the first one opens the second one when
doublc-clicking an element. I would like to programaticaly update the model
of the newly opened diagram editor.

I tried to update my semantic model in the OpenDiagramEditPolicy generated
in the first editor, I get the editing domain in the "doExecuteWithResult"
method once I get back the newly created IEditorPart, but the change is not
reflected in the opened diagram and the previous one get dirty.

Then I tried to update my semantic model in the setupDocument of my second
diagram editor document provider, I get back the editing domain using
EditingDomain domain = ((IDiagramDocument) document).getEditingDomain();
and then creating Add and Set command, I can see in debug that the code is
executed but nothing change in the diagram, and nothing get dirty.

All my editors shares the same file, model and diagram files are saved in a
unique file.

What am I missing? Is there a better place to let this specific semantic
refresh occurs ?

Thanks in advance,

Cédric
Previous Topic:Problem with the second part of the Gmf tutorial
Next Topic:Copy&Paste doesn't work anymore
Goto Forum:
  


Current Time: Thu May 08 23:18:07 EDT 2025

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

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

Back to the top