Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Z-order when the diagram is first time opened
Z-order when the diagram is first time opened [message #1852379] Thu, 12 May 2022 20:49 Go to next message
Wenqing Gu is currently offline Wenqing GuFriend
Messages: 7
Registered: April 2022
Junior Member
Hi,

Let's say we have two kinds of node in the odesign file, corresponding to the A/B types of the objects that are stored in an array in the model. In our case, A/B types share the same parent type, so they are stored in the model in a single array.

We intend to show the nodes in the order of the array when the diagram is created, but due to the fact that there're two mappings, it is always showing all A types node first and then B types of node.

Do I in any chance to reorder them in the way I want? What could be the best options?

Do not really know deep in sirius, any suggestion would be grateful!

Thanks in advance!
Re: Z-order when the diagram is first time opened [message #1852381 is a reply to message #1852379] Fri, 13 May 2022 06:41 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Hi,

A possible solution, the simpliest I think, is to have only one mapping. What is the reason to have two mappings? If it is for style, you can have one mapping with a default style for A and a conditional style for B.

Another solution is to manage z-order of nodes. But is necessary to know Sirius in deeper (GMF nodes vs Sirius nodes), using org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtension.postRefresh(DDiagram) with a org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtensionProvider using extension point "org.eclipse.sirius.refreshExtensionProvider". As the documentation said, this extension point allows you to add behaviors to the refresh operations of a viewpoint. It must be used with caution.

Regards,

Laurent


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Z-order when the diagram is first time opened [message #1852401 is a reply to message #1852381] Fri, 13 May 2022 19:18 Go to previous message
Wenqing Gu is currently offline Wenqing GuFriend
Messages: 7
Registered: April 2022
Junior Member
Thanks a lot for the prompt answer.
In fact the nodes are very different, so it is not possible with the conditional style. I will look into the other one, thanks again!
Previous Topic:Is there a way to automatically display the classes children of other classes?
Next Topic:Create path with element-based edges
Goto Forum:
  


Current Time: Fri Apr 19 03:15:39 GMT 2024

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

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

Back to the top