Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » problem with synchronize loaded model with actual state
problem with synchronize loaded model with actual state [message #931] Sun, 30 July 2006 08:55 Go to next message
Eclipse UserFriend
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?
cancel this news, I post this question in another news. [message #994 is a reply to message #931] Mon, 31 July 2006 00:40 Go to previous message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

This news did not discrip the question exactly, so I post the question in
another news, this news was canceled.
"dzh" <dzhpingbo@sohu.com> д
Previous Topic:CanonicalConnectionEditPolicy
Next Topic:problem with synchronizing model change in different diagram
Goto Forum:
  


Current Time: Wed Jul 17 09:45:02 GMT 2024

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

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

Back to the top