Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Generic tool does not work
Generic tool does not work [message #1715955] Sun, 29 November 2015 10:32 Go to next message
C Tran is currently offline C TranFriend
Messages: 15
Registered: July 2014
Junior Member
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.

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?

Please help

Thanks in advance
Re: Generic tool does not work [message #1715998 is a reply to message #1715955] Mon, 30 November 2015 10:33 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
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
Previous Topic:Recursive Creation of Nodes/Containers
Next Topic:AQL query for the "create view" action
Goto Forum:
  


Current Time: Wed Apr 24 14:37:09 GMT 2024

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

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

Back to the top