Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Event Notification
icon14.gif  Event Notification [message #756974] Tue, 15 November 2011 19:31 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Hi everyone,


I'd like to know if it is possible to listen to some change in diagram and cancel it,i.e., listen to an event when it is about to occur and then cancel it.

For example on adding some element to the diagram...


Thanks in advance.

Best Regards

[Updated on: Sat, 26 November 2011 12:03]

Report message to a moderator

Re: Event Notification [message #757040 is a reply to message #756974] Wed, 16 November 2011 08:09 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

you can override several methods of the generated editparts e.g. addNotify, handleNotificatione etc. You can also add listeners to your editparts. You should take a look at the package xxx.edit.parts. Of course you can also modify the generated commands and edit policies. Once you have found the right place to put your changes in you should think about using custom templates or GMF's extension points to place your code in. This way you do not loose code when deleting the generated and regenerate it again. This can sometime be quite handy.

Ralph
Re: Event Notification [message #757753 is a reply to message #757040] Mon, 21 November 2011 13:46 Go to previous message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Thank you
Previous Topic:Collapsible Label
Next Topic:Submissions for EclipseCon
Goto Forum:
  


Current Time: Thu Apr 25 11:10:27 GMT 2024

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

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

Back to the top