Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Java services(Java services are invoked twice)
Java services [message #1816701] Tue, 05 November 2019 10:49 Go to next message
Rakesh Nidavani is currently offline Rakesh NidavaniFriend
Messages: 25
Registered: March 2018
Junior Member
Hello Team,

We are calling Java service for data computation.

While debugging we noticed that service method are called twice once during representation creation and second while opening the diagram.

This will impact performance for complex diagrams.

Can this be avoided ?

Thank you.

Regards,
Rakesh
Re: Java services [message #1816713 is a reply to message #1816701] Tue, 05 November 2019 12:41 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Rakesh,

Could you precise in which interpreted expression do you use this service ?

Note that semanticCandidates, preconditions and others expression on the mappings are evaluated on all refreshes of the diagram.

Regarding how you want to manipulate your data, you might choose to disable the automatic refresh and refresh at opening and then let users manually refresh the diagrams.

You could also check if you need to call this service on each refresh (when your data is supposed to change, need this computation ? ) and put this service as a specific step of the diagram creation tools .

You might also nee to take a look to the different synchronization modes of the mappings described in https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#graphical_elements

You might also choose to call your service in the model operation that you can add a direct children of the DiagramDescription and which be called only once at creation time.

Regards



Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Java services [message #1816744 is a reply to message #1816713] Wed, 06 November 2019 09:00 Go to previous message
Rakesh Nidavani is currently offline Rakesh NidavaniFriend
Messages: 25
Registered: March 2018
Junior Member
Hello Maxime,

Thank you for your response.

We are facing this for semantic candidates expressions.

Since these expressions are used to compute data for nodes , its fine to invoke these on refresh or while creating representation.

But I think invoking these twice once during representation creation and second while opening the editor is not required.

Regards,
Rakesh



Previous Topic:SIRIUS AND XML
Next Topic:Update palette dynamically
Goto Forum:
  


Current Time: Wed Apr 24 14:40:50 GMT 2024

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

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

Back to the top