Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Impossible to use External Java Action
Impossible to use External Java Action [message #1728040] Wed, 30 March 2016 13:57 Go to next message
Alx Hvx is currently offline Alx HvxFriend
Messages: 40
Registered: March 2016
Member
Hi,

I have a problem that is blocking me since a few hours, I can't manage to call an External Java Action :

Here is what I did :

Add an Extension of org.eclipse.sirius.ExternalJavaAction.

index.php/fa/25472/0/

When I click on the class link it brings me to the class without any problem :

index.php/fa/25473/0/

In the odesign I added an new tool that call the java Action :

index.php/fa/25474/0/

Everything seems fine to me but when I try my tool on the diagram I got a cross instead of the selector. It seems like it can't access to my class from the diagram.

Any idea ?

Regards.

[Updated on: Wed, 30 March 2016 14:39]

Report message to a moderator

Re: Impossible to use External Java Action [message #1728055 is a reply to message #1728040] Wed, 30 March 2016 16:08 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

Le 30/03/2016 15:57, Alx Hvx a écrit :
> Hi,
>
> I have a problem that is blocking me since a few hours, I can't manage to call an External Java Action :
>
> Here is what I did :
>
> Add an Extension of org.eclipse.sirius.ExternalJavaAction.
>
>
>
> When I click on the class link it brings me to the class without any problem :
>
>
>
> In the odesign I have add an new tool that call the java Action :
>
>
>
> Everything seems fine to me but when I try my tool on the diagram I got a cross instead of the selector. It seems like it can't access to my class from the diagram.
>
> Any idea ?

Did you deploy you modeler ? Or launch a runtime ?
As the ExternalJavaAction is define in an extension point, it must be
deployed to be found by the tools.

See [1]:
As the External Java Action uses the Eclipse extension point
mechanism, it means you cannot use it in development mode (when the
Viewpoint Specification Model you are working on is in the workspace).




>
> Regards.
>

Regards


--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#external_java_action


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Impossible to use External Java Action [message #1728116 is a reply to message #1728055] Thu, 31 March 2016 08:19 Go to previous messageGo to next message
Alx Hvx is currently offline Alx HvxFriend
Messages: 40
Registered: March 2016
Member
Hi Maxime, thanks for your reply,

I launched a new runtime to use the sirius modeler (like you did in the first basic tutorial on your website).
I'm sorry but don't understand what is developpement mode for you,
I've tried to follow this tutorial (https://www.eclipse.org/sirius/doc/developer/integration-modeler_description_file_deployment.html) in order to deploy my modeler but I have the exact same problem as before.

[Updated on: Thu, 31 March 2016 08:20]

Report message to a moderator

Re: Impossible to use External Java Action [message #1728119 is a reply to message #1728116] Thu, 31 March 2016 08:35 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
On 31-Mar-16 10:19, Alx Hvx wrote:
> Hi Maxime, thanks for your reply,
> I launched a new runtime to use the sirius modeler (like you did in the
> first basic tutorial on your website).
> I'm sorry but don't understand what is developpement mode for you, I've
> tried to follow this tutorial
> (https://www.eclipse.org/sirius/doc/developer/integration-modeler_description_file_deployment.html)
> in order to deploy my modeler but I have the exact same problem as before.
>
>
I think 'development mode' means, that you edit your diagrams and
odesign in the same workspace. (Somehow similar to using dynamically
instanciated emf models, if that's familiar to you). Since you started a
runtime, afaiu everything should work as you describe. No success with
using the debugger?

Felix
Re: Impossible to use External Java Action [message #1728125 is a reply to message #1728119] Thu, 31 March 2016 09:19 Go to previous messageGo to next message
Alx Hvx is currently offline Alx HvxFriend
Messages: 40
Registered: March 2016
Member
So am I in the good mode to use the ExternalJavaCall ?

Because here is what I do to use Siruis : Generate my model/edit/editor from the gen model -> Launch a new run configuration (to open a 2nd Eclipse) -> Create my Viewpoint specification project in which I edit my odesign, put my java classes and where I've edited to plugin.xml to add the extension point -> Create a new Modeling Project and link it with the viewpoint.

Is it correct ?

For the debugger I don't know how to use it with siriuis, I tried to lunch my new runtime in debug mode but it only shows me the different threads.

[Updated on: Thu, 31 March 2016 09:22]

Report message to a moderator

Re: Impossible to use External Java Action [message #1728150 is a reply to message #1728125] Thu, 31 March 2016 11:37 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
On 31-Mar-16 11:19, Alx Hvx wrote:
> So am I in the good mode to use the ExternalJavaCall ?
>
> Because here is what I do to use Siruis : Generate my model/edit/editor
> from the gen model -> Launch a new run configuration (to open a 2nd
> Eclipse) -> Create my Viewpoint specification project in which I edit my
> odesign, put my java classes and where I've edited to plugin.xml to add
> the extension point -> Create a new Modeling Project and link it with
> the viewpoint.
>
> Is it correct ?
I'd say this is development mode... As soon as your modeling project and
your viewpoint are in the same eclipse instance you are in development
mode and cannot use java extensions.
Re: Impossible to use External Java Action [message #1728158 is a reply to message #1728150] Thu, 31 March 2016 12:09 Go to previous messageGo to next message
Alx Hvx is currently offline Alx HvxFriend
Messages: 40
Registered: March 2016
Member
Thanks,

I really have no idea on how to quit the development mode, do you have a tutorial to do that (like deploying my modeler or anything else that would help me to do what I need) ?

Re: Impossible to use External Java Action [message #1728213 is a reply to message #1728158] Thu, 31 March 2016 23:15 Go to previous messageGo to next message
Frank Sorek is currently offline Frank SorekFriend
Messages: 22
Registered: February 2016
Junior Member
If I understand correctly, you have to create the Java Extensions in your first Eclipse. So create a new project next to your model/edit/editor project.
I had a similar problem when I wanted to implement custom styles. In your "2nd eclipse" you have to add the Java Extension Project to the Dependencies.

Hope this helps Smile
Re: Impossible to use External Java Action [message #1728265 is a reply to message #1728213] Fri, 01 April 2016 13:02 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi

Le 01/04/2016 01:15, Frank Sorek a écrit :
> If I understand correctly, you have to create the Java Extensions in
> your first Eclipse. So create a new project next to your
> model/edit/editor project. I had a similar problem when I wanted to
> implement custom styles. In your "2nd eclipse" you have to add the Java
> Extension Project to the Dependencies.
> Hope this helps :)

This is a solution (which could allow to share some external java action
between different modelers without dependencies between the
corresponding plugins), but it requires to define a separated plugin.

What I called developpement mode ou live editing mode is simply the fact
to have your Viewpoint Specification Project in the same workspace than
your sample date (aird and domain model), so you can modify you odesign,
save and in live see the impacts ont your modeler. In your case your are
in a Runtime launched from a workspace containing your metamodel plugins.

If you want to use External Java Action but keep this External Java
Action in the same plugin than the odesign, I see two options:
. launch a second runtime from the runtime to edit your sample data
and test the modeler. However you will have to restart this runtime to
see the changes you make on the modeler, you are no more in this "Live
Editing Mode"
. put your Viewpoint Specification Project in the same workspace than
the metamodel plugins, launch a runtime so that it is deployed and then
import the project (without copying it) in the runtime workspace. Then
you will have the possibility to edit the odesign in the runtime and see
the impact on the test data. You just have ti pay attention when you
select the Viewpoints on your test Modeling Project: select the
Viewpoint from the workspace (see the decorators).

Regards,


--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Impossible to use External Java Action [message #1728274 is a reply to message #1728265] Fri, 01 April 2016 14:14 Go to previous messageGo to next message
Alx Hvx is currently offline Alx HvxFriend
Messages: 40
Registered: March 2016
Member
Thanks,

I will try this as soon as possible !
Re: Impossible to use External Java Action [message #1805351 is a reply to message #1728274] Fri, 12 April 2019 09:47 Go to previous messageGo to next message
Jef Stegen is currently offline Jef StegenFriend
Messages: 4
Registered: April 2019
Junior Member
Hello,
any update on this?
I find it hard to understand that it is possible to customize and use the services class in development mode but its not possible to use external java actions.
I had the external java actions working with the VSM in the same workspace as the metamodels. Now i would prefer using the development mode for not having to restart the runtime with every change. Did this become possible in the meantime?
Thanks in advance,
Jef
Re: Impossible to use External Java Action [message #1823787 is a reply to message #1805351] Thu, 02 April 2020 06:33 Go to previous message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 131
Registered: October 2019
Senior Member
I checked and as of today, you still need to have the java action installed prior to launching the development workspace.

Specifically, what I do is one of two things:
1. For debugging the java action itself - I run another runtime environment from the development runtime environment (X.design). It's not smooth, but it's less demanding than creating a new plugin and installing it and then realizing the java action is not working well. One tip I can offer is that you can use the same sample project you use for debugging in the development environment for the new runtime (just import the project).

2. After the java action is working well, I deploy it (in a plugin), and then continue to work with the environment of the X.design project.
Previous Topic:Opening external browser
Next Topic:Can't use aql due to java.lang.IllegalStateException
Goto Forum:
  


Current Time: Tue Apr 23 15:40:33 GMT 2024

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

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

Back to the top