Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » External Java action when changing context of an element
icon5.gif  External Java action when changing context of an element [message #1711484] Fri, 16 October 2015 11:56 Go to next message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
Hi all,

I have a container element and I want to do an external Java action when the context of container is changed, for example: when I add Node in Container or when I change Node's attributes.

Could you please show me how to do it?

Best Regards,
Tuan Hoang
Re: External Java action when changing context of an element [message #1711496 is a reply to message #1711484] Fri, 16 October 2015 12:55 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 174
Registered: October 2014
Senior Member
Le 16/10/2015 13:56, Tuan Hoang Anh a écrit :
> Hi all,
>
Hi

> I have a container element and I want to do an external Java action when
> the context of container is changed, for example: when I add Node in
> Container or when I change Node's attributes.
>
> Could you please show me how to do it?
>
A tool which would listen for the context change does not exist.
But you can execute java code when using a tool either using java
services [1] or with external java action [2].
> Best Regards,
> Tuan Hoang
[1]
http://help.eclipse.org/mars/topic/org.eclipse.sirius.doc/doc/specifier/general/Writing_Queries.html?cp=69_2_7_6#service_methods
[2]
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Fspecifier%2Fgeneral%2FModel_Operations.html&cp=69_2_5&anchor=extensions


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: External Java action when changing context of an element [message #1711658 is a reply to message #1711496] Mon, 19 October 2015 07:03 Go to previous message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
Laurent Fasani wrote on Fri, 16 October 2015 12:55
Le 16/10/2015 13:56, Tuan Hoang Anh a écrit :
> Hi all,
>
Hi

> I have a container element and I want to do an external Java action when
> the context of container is changed, for example: when I add Node in
> Container or when I change Node's attributes.
>
> Could you please show me how to do it?
>
A tool which would listen for the context change does not exist.
But you can execute java code when using a tool either using java
services [1] or with external java action [2].
> Best Regards,
> Tuan Hoang
[1]
http://help.eclipse.org/mars/topic/org.eclipse.sirius.doc/doc/specifier/general/Writing_Queries.html?cp=69_2_7_6#service_methods
[2]
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Fspecifier%2Fgeneral%2FModel_Operations.html&cp=69_2_5&anchor=extensions

Hi Laurent,

Thank for your answer.
I know how to use the External Java Action and I want to call it when the context of element changes. But my issue here is that I don't know when the context of element changes, because there are many ways to change the context of container, such as adding/ removing sub-Node, changing name of container, or editing sub-Node ...

Could you please guide me how to implement the listener for these actions?

Best Regards,
Tuan Hoang
Previous Topic:Grouping items in a table
Next Topic:How to change property of object with tool
Goto Forum:
  


Current Time: Thu Jan 28 06:23:48 GMT 2021

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

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

Back to the top