problem with synchronize loaded model with actual state [message #931] |
Sun, 30 July 2006 04:55  |
Eclipse User |
|
|
|
Originally posted by: dzhpingbo.sohu.com
I want to fulfill the function as describe in
http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg03127.html;
but in different way.
I want to invoke CreateViewRequest to fulfill this.
I have two Diagrams with the same metamodel.
In DiagramA, I create a view with an element called "data", In DigarmB, I
create another view with the same element "data". The code is listed below:
In getOpenCommand() method of MyEditPolicy:
CreateViewRequest.ViewDescriptor viewDescriptor = new
CreateViewRequest.ViewDescriptor(new EObjectAdapter(data), Node.class, null,
ProcessDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
CreateViewRequest cvRequest = new CreateViewRequest((viewDescriptor));
Command cmd = getHost().getCommand(cvRequest);
By doing so ,I can create different view in two diagram with the same
element . But when I change the name of the view in DiagramA, the view in
diagram B didn't change at all, unless I refresh the DiagramB manually. It
seems like that the view in Diagram B does not listen to the change of its
element.
It must be something wrong. And I was hold up by this for quite a few days,
looking forward to your answers.
By the way, does I set the parameter 'new EObjectAdater(selectedElement)'
right, or it should be something else?
|
|
|
|
Powered by
FUDForum. Page generated in 0.02929 seconds