Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Event Notification
icon14.gif  Event Notification [message #756974] Tue, 15 November 2011 14:31 Go to next message
Eclipse UserFriend
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 07:03] by Moderator

Re: Event Notification [message #757040 is a reply to message #756974] Wed, 16 November 2011 03:09 Go to previous messageGo to next message
Eclipse UserFriend
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 08:46 Go to previous message
Eclipse UserFriend
Thank you
Previous Topic:Collapsible Label
Next Topic:Submissions for EclipseCon
Goto Forum:
  


Current Time: Wed Jul 23 07:41:17 EDT 2025

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

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

Back to the top