Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Question about notification
icon3.gif  Question about notification [message #548068] Tue, 20 July 2010 15:04 Go to next message
123star  is currently offline 123star Friend
Messages: 70
Registered: June 2010
Member
Hi,

I'd like to modifiy the model when the user change it: for example when the user link two classes with generalization, all the ports of supertclass must be copied in subclass.

I know how to catch the events fired from model changes but I don't know how to modify the model from the Notification.

How can i do that? Is there any code tutorial I can follow?

Thanks in advance, star123

Re: Question about notification [message #548083 is a reply to message #548068] Tue, 20 July 2010 15:30 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, star123,

If your application uses a GMF-based diagram editor, then it already
employs a TransactionalEditingDomain. This gives you a "trigger" API
with which you can react to changes in the model to follow up with
additional edits such as copying the ports.

There is a tutorial and other documentation in the "EMF Model
Transaction Developer Guide" in the on-line help. This is assuming, of
course, that you have installed the EMF Model Transaction SDK.
Otherwise, find it here:

http://help.eclipse.org/

HTH,

Christian


On 20/07/10 11:04 AM, 123star wrote:
> Hi,
>
> I'd like to modifiy the model when the user change it: for example when
> the user link two classes with generalization, all the ports of
> supertclass must be copied in subclass.
>
> I know how to catch the events fired from model changes but I don't know
> how to modify the model from the Notification.
>
> How can i do that? Is there any code tutorial I can follow?
>
> Thanks in advance, star123
>
>
Previous Topic:How to generate an ecore from XSD without Type being appended
Next Topic:Emf.Edit: Deletion of a linkage instead of the linked element itself
Goto Forum:
  


Current Time: Wed Apr 24 17:54:42 GMT 2024

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

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

Back to the top