Skip to main content



      Home
Home » Eclipse Projects » Sirius » Java Service does not get invoked?
Java Service does not get invoked? [message #1842622] Fri, 25 June 2021 12:15 Go to next message
Eclipse UserFriend
I'm building a Sirius-based language that uses a Java-based service as part of some node pre-conditions and some conditional-style conditions (effectively to give instantaneous feedback to the modeller).

My diagrams are behaving strangely and it seems that the reason for this is that the Java-based service doesn't actually get invoked. I am at a loss for why this might be, though.

My setup is such that I have my meta-model and the code generated from it in plugin projects in my development Eclipse. I also have in that same development Eclipse a plugin project containing the Sirius viewpoint specification and the Service class (written in Xtend but I assume that shouldn't make a difference). My odesign file references the Service class and the service method is defined to take an instance of one of my meta-classes and return an int.

Whenever I use a call to my service method from within the odesign file, this appears to be silently ignored (I believe it may lead to a null return), leading to some strange behaviour -- for example the node that has conditional styles is added to the diagram but shows as completely transparent because none of the conditions evaluate to true. However, arrows still connect to the invisible node.

I could not find any error messages or exceptions anywhere. Somewhat confusingly, there was a moment during development when the service method was invoked (I had added some print statements), but this suddenly changed even though I do not recall making any changes other than adding a bit more code inside the service method and adding its invocation to the conditional styles.

I assume that this is some sort of configuration problem, but don't know where else I should look for a possible solution.

Does anybody have an idea what I might be doing wrong?

Many thanks in advance,

Steffen
Re: Java Service does not get invoked? [message #1842678 is a reply to message #1842622] Mon, 28 June 2021 10:56 Go to previous messageGo to next message
Eclipse UserFriend
Turns out it was the use of Xtend after all. For some reason, Sirius doesn't seem to invoke the service when it is written in Xtend but is happy to invoke it when written in Java directly.

Does anybody have an idea as to why this might be happening? Am I missing some configuration to enable Sirius to find the Java class Xtend has generated from my Xtend code?
Re: Java Service does not get invoked? [message #1842680 is a reply to message #1842678] Mon, 28 June 2021 11:19 Go to previous messageGo to next message
Eclipse UserFriend
Gah, total red herring and false alarm. Classic rookie mistake: I forgot to add a jar file I was using as part of the plugin classpath and, as a result, my Services class couldn't be run. Unfortunately, Sirius didn't give me any meaningful error message anywhere, sending me round the houses for a good while until I picked up my mistake.
Re: Java Service does not get invoked? [message #1842950 is a reply to message #1842680] Wed, 07 July 2021 10:29 Go to previous message
Eclipse UserFriend
Hello,

Can you create a Bugzilla about it, so we can improve the feedback on this type of issue?

Best regards,
Steve
Previous Topic:setName on a DRepresentation programmatically
Next Topic:Issue to install Sirius 6.5 on Eclipse 2021-06-R
Goto Forum:
  


Current Time: Thu Jul 03 19:20:18 EDT 2025

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

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

Back to the top