Best place to update model content programatically [message #147875] |
Mon, 27 August 2007 08:50 |
Cedric Brun 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.
|
|
|
Powered by
FUDForum. Page generated in 0.03471 seconds