|Multiple Diagram Servers [message #1794619]
||Tue, 04 September 2018 04:45
| Rijul Saini
Registered: September 2018
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.
Powered by FUDForum
. Page generated in 0.02156 seconds