|
Re: How to call a Java service [message #1699339 is a reply to message #1699234] |
Tue, 23 June 2015 13:33 |
|
Hi "qwer qwer"
Le 23/06/2015 15:08, qwer qwer a écrit :
> Hi everyone,
>
> a couple of days I'm trying to call a Java Service from my viewpoint but
> I can't make it work. I need a service with a method which creates a
> label for a component of my diagram.
> I have a single viewpoint specification project with my metamodel,
> model, .odesign and in src/mypackage I defined the Java service with a
> public constructor with no arguments and a public method which takes a
> paramter from type EObject and returns an EObject. I tried to reference
> the service through Java Extension (with path:
> MyProject/src/mypackage/Service.java) but it doesn't seem to be working.
You will find information about Java services in [1], note that you have
to use the "fully qualified Java name" of your service class.
You should try: mypackage.Service
> The service could not be found and I am not able to call the method
> (through Service:myMethod or [myObject.myMethod()/]).
"Service:" is not supported, the prefix of the service interpreter is
"service:".
> Could you please tell me, what I'm doing wrong and what is the right way
> to call a Java Service. Sirius is something new for me, I'm a beginner.
>
> Thank you in advance! :)
Regards
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
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.01799 seconds