|
Re: Impossible to use External Java Action [message #1728055 is a reply to message #1728040] |
Wed, 30 March 2016 16:08 |
|
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 #1728125 is a reply to message #1728119] |
Thu, 31 March 2016 09:19 |
Alx Hvx 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 #1728265 is a reply to message #1728213] |
Fri, 01 April 2016 13:02 |
|
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
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04443 seconds