Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Handling changes outside of editor
Handling changes outside of editor [message #482784] Thu, 27 August 2009 23:41 Go to next message
Travis London is currently offline Travis LondonFriend
Messages: 14
Registered: July 2009
Junior Member
Hello,

I have a general question regarding GMF support for responding to external
changes to the diagram elements.

What I have is a tree editor, soon to be a view explorer (of the domain
model). The problem that I have is that if I delete the domain elements
outside of the diagram, the listeners pick the deletion up and remove the
graphic. This is fine, with one exception. The exception is that undoing
the delete does not restore the graphical layout. The reason being that
the graphical deletes handled in the handleNotification methods of the
edit parts are not within the transaction. Therefore they are restored by
another listener which does not know what the previous layout values were,
i.e, the x and y positions. This causes them to use their default layout
determined by the layout provider.

This seems odd to me that this situation is not supported, therefore I
decided I'd post the question and see if maybe I was doing something
wrong. If it is not supported by default in GMF and cannot be enabled
easily can you suggest some ways that it could be supported? I have
created a resource set listener to call ViewUtil.destroy() but it seems to
interfere with the DiagramEventBroker and cause unwanted results.

Thanks,
Travis London
Re: Handling changes outside of editor [message #482857 is a reply to message #482784] Fri, 28 August 2009 10:38 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Travis,

If you need to make undo for diagram element deletion working then you need
to delete both domain and diagram element inside the same command using EMF
model instance loaded by GMF editor (using EditingDmoain shared across diagram
editor and your view).

-----------------
Alex Shatalin
Previous Topic:Drag and drop into node from other plug-in
Next Topic:Link Mapping to shortcuts
Goto Forum:
  


Current Time: Tue Apr 23 12:17:22 GMT 2024

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

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

Back to the top