|
Re: Generic tool does not work [message #1715998 is a reply to message #1715955] |
Mon, 30 November 2015 10:33 |
|
Hi,
Le 29/11/2015 11:32, C Tran a écrit :
> Hi community,
>
> Is there anyone using the generic Tool? I tried a very simple implementation which calls a Java Action (see attachment) but it never seems to work.
Be aware that there is two usage of the External Java action: as a task
of a tool or directly as a tool (it will create a menu entry in the
contextual menu). I have just checked the code, and bose cases seems to
call the canExecute method.
Note that the modeler has to be deployed to be able to use those
external java action as they are defined through extension points (see [1])
>
> First the tool is never `enabled' on the fact that the mouse cursor is always a circle with diagonal line across; same graphic for where any tool is not applicable. Second, the `canExecute' is never called. I tried on two different machines with different metamodels; one is my own and another one is the family example. The result is the same.
>
> I am very baffled on what the problem really is? Is there something to do to `enable' the tool? Or is there anything more to do on the implementation of the Java Action class?
This seems to indicates that Sirius was not able to retrieve/load you
the java class referenced by the id of the external java action.
How did you register it ? Is your extension declaration in the
plugin.xml valid ? Is the java class in the the same plugin (not
mandatory), in a deployed plugin ?
See the corresponding documentation in [2]
Note that you might probably use java service instead (in a
ChangeContext element, then see [3]
>
> Please help
>
> Thanks in advance
>
Regards,
--
Maxime - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
https://www.eclipse.org/sirius/doc/specifier/general/Specifying_Viewpoints.html#dynamic
[2]
https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#extensions
[3]
https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03956 seconds