Skip to main content



      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 16:49 Go to next message
Eclipse UserFriend
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 02:41 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Z-order when the diagram is first time opened [message #1852401 is a reply to message #1852381] Fri, 13 May 2022 15:18 Go to previous message
Eclipse UserFriend
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: Thu May 08 12:43:48 EDT 2025

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

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

Back to the top