Skip to main content



      Home
Home » Eclipse Projects » Sirius » Expand/Collapse all nodes
Expand/Collapse all nodes [message #1829283] Tue, 30 June 2020 08:24 Go to next message
Eclipse UserFriend
I would like to know how to Expand/Collapse all nodes inside my Diagram with a single click, from a tool in the Palette or using a Keyboard Key. any Ideas on how to do this ?



Re: Expand/Collapse all nodes [message #1829366 is a reply to message #1829283] Thu, 02 July 2020 03:26 Go to previous messageGo to next message
Eclipse UserFriend
Hello

I guess you are taking about the ability to fold edges (and related nodes) using the "Folding Style" on the edgeMapping.

It is not currently possible natively.

To achieve that you have to implement your own action.
* add an action (from contextual menu on the diagram(you can contribute it in the odesign) or from diagram toolbar)
* call org.eclipse.sirius.diagram.ui.tools.internal.commands.ToggleFoldingStateCommand on each node that are folded. To know about the edge folded state : org.eclipse.sirius.diagram.ui.business.internal.query.EdgeTargetQuery.isFoldingPoint() or have a look to ToggleFoldingStateCommandto have usefull tips

Regards
Laurent
Re: Expand/Collapse all nodes [message #1829498 is a reply to message #1829366] Sun, 05 July 2020 10:14 Go to previous message
Eclipse UserFriend
Hi Laurent,

Thank you for your answer. my first post was not clear, sorry for that.
Each node inside my diagram is a container and each Container has another container inside(Picture1 ) . I want to be able to fold/unfold the second container(Picture2) which is the behaviour that occurs when you click on the little + sign on the left. but I want to do that with one click and for all nodes.
I tried using a mapping filter that filters the second Container.
It works when I choose the Hide option but that is not what I need because I can't see the Description anymore(Picture3).
But nothing happens when I choose the Collapse option, which should get the right behaviour.

So how do you think I can fix this. or how can I reprocude this behaviour progammatically ?

Thanks in advance
  • Attachment: Picture1.PNG
    (Size: 24.84KB, Downloaded 103 times)
  • Attachment: Picture2.PNG
    (Size: 20.99KB, Downloaded 111 times)
  • Attachment: Picture3.PNG
    (Size: 13.87KB, Downloaded 108 times)
Previous Topic:Encapsulating Sirius UI in a minimal RCP product
Next Topic:6.3.1 Will Not Upgrade on 2019-06 Modeling Tools
Goto Forum:
  


Current Time: Wed Jun 18 08:48:40 EDT 2025

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

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

Back to the top