Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Invoking java services on a double click action
Invoking java services on a double click action [message #1861316] Thu, 05 October 2023 08:44 Go to next message
Leonard Theisler is currently offline Leonard TheislerFriend
Messages: 16
Registered: September 2023
Junior Member
Hi,

I am trying to take the xmi file that is generated when graphically editing the model and to convert it to an xml and save it. I have a method that does this accurately (made for another project, tested fine). However, I am having an issue with calling this method. I understand that it needs to be in a java service, and I have made a double click action in order to call the method. However, it seems that the method is not called when I double click on the mapped element. I am not sure what is wrong, I have tried a bunch of different aql expressions to call the method. Also, I am not entirely sure where to call the java service, should it be in a "change context" under the double click tool or should it be somewhere else? I have uploaded a few screenshots to show you what I have at the moment. Does anyone know what I am doing wrong?

Thanks for the help
Re: Invoking java services on a double click action [message #1861439 is a reply to message #1861316] Thu, 12 October 2023 13:09 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 705
Registered: July 2009
Senior Member
Hi.

It looks like a syntax error in the expression ("service.myService").

It should be either "service:myService" or "aql:self.myService()"

"aql:" uses the plain AQL interpreter, which is the prefered approach. It's more flexible/powerful and reasonably fast (small overhead) for such simple cases.

"service:" delegates to a special purpose interpreter which is very fast but also very limited and can only invoke Java services (no complex expressions). It should only be used on expressions which are invoked a lot (e.g. label expressions invoked for many nodes on every refresh) and then only if you see performance issues when using AQL (very rare in practice).


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Get semantic element of a selected Sirius element in command handler without depending on Sirius?
Next Topic:Tuning genmodel parameters to change XMI file
Goto Forum:
  


Current Time: Mon Oct 14 11:51:35 GMT 2024

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

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

Back to the top