Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » External Java Action(Use example needed)
External Java Action [message #1366639] Mon, 19 May 2014 12:05 Go to next message
Patrick P. is currently offline Patrick P.Friend
Messages: 4
Registered: May 2014
Junior Member
I am new in Eclipse environnement and the section describing use of "External Java Action" is not clear for me. Does anyone has a more detailled example to follow?

Thanks.
Re: External Java Action [message #1368810 is a reply to message #1366639] Tue, 20 May 2014 09:34 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Patrick,

I suggest you to install the Sirius sample feature from the Sirius
update-site
(http://download.eclipse.org/sirius/updates/milestones/1.0.0M7/luna).

Then import as “Plug-ins and Fragments” the plugin
“org.eclipse.sirius.sample.ecore.design” into your workspace. There is
an example of external java action within the ecore.odesign (Design >
Entities > Default > Section Dynamic > Tool Dynamic instance).
This external java action is declared with the
“org.eclipse.sirius.externalJavaAction” extension point.


Regards,

Florian

On 05/19/2014 10:26 PM, Patrick P. wrote:
> I am new in Eclipse environnement and the section describing use of
> "External Java Action" is not clear for me. Does anyone has a more
> detailled example to follow?
>
> Thanks.
Re: External Java Action [message #1371660 is a reply to message #1368810] Wed, 21 May 2014 13:34 Go to previous messageGo to next message
Patrick P. is currently offline Patrick P.Friend
Messages: 4
Registered: May 2014
Junior Member
Thanks a lot Florian ; the example helps me to do what I want for the moment.
Re: External Java Action [message #1420772 is a reply to message #1371660] Wed, 10 September 2014 13:02 Go to previous messageGo to next message
MG Gharib is currently offline MG GharibFriend
Messages: 30
Registered: September 2014
Member
I'm sorry, but I have the same problem and I didn't knew how to use the example you suggested.
Best regards
Re: External Java Action [message #1422136 is a reply to message #1420772] Fri, 12 September 2014 11:28 Go to previous messageGo to next message
Dat Nguyen is currently offline Dat NguyenFriend
Messages: 34
Registered: July 2014
Member
First, in tab Extensions in MANIFEST file of your project, you declare extension point org.eclipse.sirius.externalJavaAction (via button Add...), specify the class (clic to class* the class will be created in folder src automatically), id, image,...
Second, you specify behavior in the class specified.
Final, you use the Id in External Java Action.
Re: External Java Action [message #1438581 is a reply to message #1422136] Mon, 06 October 2014 08:18 Go to previous messageGo to next message
MG Gharib is currently offline MG GharibFriend
Messages: 30
Registered: September 2014
Member
Thank you very much
Re: External Java Action [message #1749976 is a reply to message #1366639] Wed, 14 December 2016 15:33 Go to previous messageGo to next message
Harald Bauer is currently offline Harald BauerFriend
Messages: 4
Registered: December 2016
Junior Member
Hi everyone,

I'm also looking for an example to learn how to use external java actions however the link for the sirius sample feature is not working anymore.... can anyone tell me where I could get the example from? Or is there a different example that I could use?

Thank you

Harald
Re: External Java Action [message #1750049 is a reply to message #1749976] Thu, 15 December 2016 13:06 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

In the documentation about external java actions[1], there are 3 standard ones that are presented. You can find these actions in plugins "org.eclipse.sirius" and "org.eclipse.sirius.ui".

Regards,
Steve
[1] https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#external_java_action


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: External Java Action [message #1750781 is a reply to message #1750049] Wed, 28 December 2016 16:22 Go to previous messageGo to next message
Harald Bauer is currently offline Harald BauerFriend
Messages: 4
Registered: December 2016
Junior Member
Hi Steve,

thank you very much for your answer. I managed to integrate the standard ones as tool in my diagram. However, can you tell me where I can open the codes of these standard actions and where the sirius model gets them from? I searched in the folders but I couldn't find it.....

Thank you!

Kind regards,

Harald

[Updated on: Wed, 28 December 2016 16:23]

Report message to a moderator

Re: External Java Action [message #1750803 is a reply to message #1750781] Thu, 29 December 2016 08:19 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi,

The source code for the two standard actions and their common superclass can be found at https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/api/action.

Regards,
Pierre-Charles David


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: External Java Action [message #1750816 is a reply to message #1750803] Thu, 29 December 2016 11:31 Go to previous messageGo to next message
Harald Bauer is currently offline Harald BauerFriend
Messages: 4
Registered: December 2016
Junior Member
Hi,

thank you for the quick response. But how do I get the code from the link you've send me? Should the shown path also be in my eclipse/sirius folders? (I can't find it there though...)

Kind regards,

Harald
Re: External Java Action [message #1750861 is a reply to message #1750816] Fri, 30 December 2016 08:52 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi,

There was a formatting problem on my message, the correct URL is: https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/api/action

Simply click on any of the 3 classes there to see their code. It's a view of the Git repository of the Sirius sources; if you want to get them locally you'll have to clone the repo.

Regards,
Pierre-Charles David


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: External Java Action [message #1750869 is a reply to message #1750861] Fri, 30 December 2016 11:14 Go to previous message
Harald Bauer is currently offline Harald BauerFriend
Messages: 4
Registered: December 2016
Junior Member
Hi,

thank you for your quick help! This helps me to understand how to program an external java action and how to use the ones out of the repository as a tool in my odesign.

I was now trying to set up an java action on my own and use it in my sirius diagram however I don't really understand where in the project I have to implement the action so that I can call/use it as a tool in my odesign.
If I would just want to set up one of the standard actions by myself (e.g. PrintInterpreterVariableAction), where would I have to copy paste the code so that I can call it from the odesign?

Is there a step by step tutorial on that somewhere?

Sorry for being so bad at this... I really appreciate your help!

Kind regards,

Harald

Previous Topic:Create a Button to External Java Code
Next Topic:Edge creation tool not working
Goto Forum:
  


Current Time: Tue Apr 23 06:06:19 GMT 2024

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

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

Back to the top