Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Expand/Collapse all nodes
Expand/Collapse all nodes [message #1829283] Tue, 30 June 2020 12:24 Go to next message
fares kallel is currently offline fares kallelFriend
Messages: 9
Registered: May 2020
Junior Member
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 07:26 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 173
Registered: October 2014
Senior Member
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


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Expand/Collapse all nodes [message #1829498 is a reply to message #1829366] Sun, 05 July 2020 14:14 Go to previous message
fares kallel is currently offline fares kallelFriend
Messages: 9
Registered: May 2020
Junior Member
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 10 times)
  • Attachment: Picture2.PNG
    (Size: 20.99KB, Downloaded 9 times)
  • Attachment: Picture3.PNG
    (Size: 13.87KB, Downloaded 10 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: Sun Oct 25 03:30:57 GMT 2020

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

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

Back to the top