Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsUsing Java script as a service
https://www.eclipse.org/forums/index.php/mv/msg/766311/1368845/#msg_1368845
I have to use a Java script (a very simple class with one method in order to test) as a service.
I follow the two recommandation concerning the fact that :
- the first parameter must be an EObject,
- the class is imported using a Java Extension in the odesign model.
But when I use this service in my model, I have a message saying that the compilator cannot find my method for the object.
What did I forget ?
OK subject closed thanks to a response to my previous topic telling me to look at ecore example in sirius...]]>Patrick P.2014-05-20T09:50:34-00:00Re: Using Java script as a service
https://www.eclipse.org/forums/index.php/mv/msg/766311/1371228/#msg_1371228
Which interpreter do you use to call your service? There is two possible
interpreters: acceleo3 and “service:” interpreter.
In the second case (“service:” interpreter), your Java Class that
contains the service must be deployed in your bundle. (see “Using the
Specialized interpreters” section in Sirius > Sirius Specifier
Manual>Writing Queries and Interpreted Expressions for more details).
In addition, the java service class has to declare a default constructor
which takes no argument.
Regards,
Florian
On 05/20/2014 11:50 AM, Patrick P. wrote:
> Hello,
>
> I have trued to use a Java script (a very simple class with one method
> in order to test) as a service.
> I follow the two recommandation concerning the fact that : - the first
> parameter must be an EObject, - the class is imported using a Java
> Extension in the odesign model.
>
> But when I use this service in my model, I have a message saying that
> the compilator cannot find my method for the object.
> What did I forget ?
>]]>Florian Barbin2014-05-21T09:18:20-00:00