Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Button in Tool Section only to trigger external java action
Button in Tool Section only to trigger external java action [message #1776415] Thu, 16 November 2017 10:01 Go to next message
Bo Liu is currently offline Bo LiuFriend
Messages: 32
Registered: July 2016
Member
Hello Community,

i want a button in the tool palette to call a external java action.
is it possible to do so?
If it si possible, how do I pass the parameters of the root element of the diagram to the external java action?

Thx!
Re: Button in Tool Section only to trigger external java action [message #1776426 is a reply to message #1776415] Thu, 16 November 2017 11:20 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

You can either add an "external java action call"[1] model operation or call a Java service[2] in a model operation in your tool.

Regards,
Steve

[1] https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#external_java_action_call
[2] https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Button in Tool Section only to trigger external java action [message #1776527 is a reply to message #1776426] Fri, 17 November 2017 10:21 Go to previous messageGo to next message
Bo Liu is currently offline Bo LiuFriend
Messages: 32
Registered: July 2016
Member
Hi Steve,

i've tried to define a External Java Action Call.
But it is not showed in the Tool Palette.
Is there anything I have to do to let it work?

Regards,
Bo
Re: Button in Tool Section only to trigger external java action [message #1776540 is a reply to message #1776527] Fri, 17 November 2017 12:47 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
An external java action call is a model operation in a tool. The tool will be on the palette not the external java action call.
Note that I would recommand to use a Java service instead of an external java action call. It is more direct to implent as it does not require an extension point.


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Add dropdown menu to diagram tabbar
Next Topic:Two different representations of the same relationship
Goto Forum:
  


Current Time: Sat Apr 20 06:23:14 GMT 2024

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

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

Back to the top