Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Sprotty » Multiple Diagram Servers(Only recently opened diagram gets updated properly in case of multiple diagram servers)
Multiple Diagram Servers [message #1794619] Tue, 04 September 2018 04:45 Go to next message
Rijul Saini is currently offline Rijul SainiFriend
Messages: 1
Registered: September 2018
Junior Member
I have multiple widgets( diagram servers) based on one Xtext model. Now, while updating, I have changed some methods on the server side so that first we will collect URIs of different diagram widgets and then for each URI, it will call the updateDiagram method.

Now, this is updating the widgets (like labels of Nodes, edges) according to the changes I am making in Xtext model. However, the size and alignment of Node are updated only for the recently opened widget(diagram server).

I believe this is due to copyLayoutData method of class LayoutUtil which copies the layout of one model instance to another. Since, the currentRoot is available for the recently opened diagram server hence it is able to copy the layout from currentRoot to newRoot without creating a new model. But the currentRoot is lost for other widgets(diagramServers). Because of this, the size of Node (Height, Width) as well as alignment (Point x,y) becomes zero.

In the attached screenshot,

for the Xtext model(grl_sample2.turn), Substudent widget gets opened up recently hence the size and alignment of node gets intact however for the other widgets for example Student, the size and alignment of the nodes become zero.

Therefore, request your advice on this.
Re: Multiple Diagram Servers [message #1794820 is a reply to message #1794619] Fri, 07 September 2018 06:39 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 759
Registered: July 2009
Location: Hamburg
Senior Member
Hi Rijul,

the problem is that you have created an advanced, non-standard setup, and it would require us a lot of effort to understand what you might have done and then come to a conclusion how to resolve this.

It would be helpful if you could share the code or better a minimized example reproducing the problem.

From your description, I could only guess that it is a bad idea to call updateDiagram on URIs that don't belong to the same diagram server.

Best regards

Get professional support from the Xtext committers at
Goto Forum:

Current Time: Tue Sep 18 16:21:52 GMT 2018

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

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

Back to the top