Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » event listener(event listener)
event listener [message #1759582] Thu, 13 April 2017 12:39 Go to next message
sarah sh is currently offline sarah shFriend
Messages: 32
Registered: March 2017
Member
Hello

I have a question. How can I do an action if the name is changed?

Thank you
Re: event listener [message #1759584 is a reply to message #1759582] Thu, 13 April 2017 13:11 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

You can add a ResourceSetListener (see session.getTransactionalEditingDomain().addResourceSetListener()) where the method resourceSetChanged(ResourceSetChangeEvent event) reacts only on the event where the name feature is changed.
Or better add a ModelChangeTrigger (through the session event broker) with a Scope reduced to the name field(s) you want it triggered.

You can find many examples of both solution in Sirius code.

Regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: event listener [message #1759595 is a reply to message #1759584] Thu, 13 April 2017 15:14 Go to previous message
sarah sh is currently offline sarah shFriend
Messages: 32
Registered: March 2017
Member
Thank you for your response. I should add these methods as a java service in the view point specification project?
Previous Topic:define element's name
Next Topic:[ANN] Sirius 4.1.4
Goto Forum:
  


Current Time: Thu Mar 28 12:10:14 GMT 2024

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

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

Back to the top