Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:50
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
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


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:Problem with the second part of the Gmf tutorial
Next Topic:Copy&Paste doesn't work anymore
Goto Forum:
  


Current Time: Tue Oct 08 15:25:12 GMT 2024

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

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

Back to the top