Bug 352868 - Folding for all nodes (not just top-level) and/or siblings to current
Summary: Folding for all nodes (not just top-level) and/or siblings to current
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: junior-jobs
: 386920 402146 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-18 08:31 UTC by Mykola Krachkovsky
Modified: 2019-04-30 08:56 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mykola Krachkovsky 2015-09-18 08:31:06 UTC
There is command to fold top-level nodes. It's helpful for C++ and much other languages. But XML and HTML has one top level node. Folding nodes one by one may be very boring and time consuming for large XMLs. It's good to have commands (at least one of them):
1. To fold all nodes. So when you unfold top level node it's child nodes would be still folded.
2. To fold current node and it's siblings. With and/or without child nodes.
3. To fold current node and same named nodes (i.e. same tag name in XML). This one may be harder to implement, so I don't expect it too much.

Reproducible: Always
Comment 1 sabri unal 2016-12-31 14:14:40 UTC
I have 2500 line a Class with many functions.

I can fold all nodes on top level, but I cant open all nodes again; because not have a function on kate.

I think, fold icon blue triangle is good, but folded icon must be different color: for example red or maroon.

We can select a code/text area, after click fold all nodes, or unfold all nodes

/Sorry my bad English.
Comment 2 arne anka 2017-03-21 10:38:31 UTC
asking for the same feature as the OP.
in XML the current feature to fold exactly one node (either current or top) is rather useless without the feature to fold _all_ nodes.

with a lengthy document you cannot fold each and every single node to mae fold/unfold current node useful.
and with teh same lengthy XML document fold/unfodl top node is basically meaningless, I can't imagine a scenario where one could profitably employ that feature.
Comment 3 Dominik Haumann 2017-03-21 18:02:22 UTC
Which version of the KDE KTextEditor Framework?
Comment 4 Francis Herne 2017-03-21 23:39:25 UTC
Still a missing feature in 5.32 (and afaik current git).
Comment 5 arne anka 2017-03-22 10:39:29 UTC
(In reply to Dominik Haumann from comment #3)
> Which version of the KDE KTextEditor Framework?

About -> Version tab:

Version: 16.08.3

Using:
KDE Frameworks 5.28.0
Qt 5.7.1 (built against 5.7.1)
The xcb windowing system

IMO, for XML style files, the only sensible use case for "collapse top level node" is to collapse all child nodes (however deep), and leave them collapesed when expanding top level node again.

just having the two lines with the xml header and the top level element seems meaningless otherwise.
Comment 6 Mykola Krachkovsky 2017-03-22 10:46:48 UTC
Right now I'm using Kate from KDE Applications 16.12.3, KDE Frameworks 5.31.0, Qt 5.7.1.
Comment 7 Francis Herne 2017-11-14 22:08:49 UTC
*** Bug 386920 has been marked as a duplicate of this bug. ***
Comment 8 Kevin Funk 2017-11-15 09:27:58 UTC
This seems to be a popular request and something which is relatively easy to implement (iiuc). 

Marking as junior job (something newcomers could tackle).
Comment 9 Silviu 2018-12-15 09:49:16 UTC
There are more than three years since the "fold all" command was requested. I'm expecting the solution on each new release, but it seems that thinks are going very hard with this. Please make a small effort and implement this in KDevelop. Otherwise KDevelop is a wonderful tool.
Many thanks for your work
Comment 10 Francis Herne 2018-12-16 01:26:25 UTC
*** Bug 402146 has been marked as a duplicate of this bug. ***
Comment 11 Lothar 2019-04-19 13:23:51 UTC
Hi! A little hard for me to follow here. Will...
https://phabricator.kde.org/D20606
...fix this too, so we can close it?
Comment 12 Mykola Krachkovsky 2019-04-29 09:08:17 UTC
(In reply to Lothar from comment #11)
> Hi! A little hard for me to follow here. Will...
> https://phabricator.kde.org/D20606
> ...fix this too, so we can close it?

Maybe but:
1) this hasn't landed into master yet, is it?
2) imho, it's not very obvious to use LMR clicks for this task, and no hotkey support. it looks like some hidden knowledge. Anyway thanks for your work! It'll good to have this feature.
Comment 13 Lothar 2019-04-29 21:00:34 UTC
1) https://phabricator.kde.org/R39:5c83e29561e3425fb1f917a2c8de31eb48a5cd8d
2) No default short-cut, but action is available
Comment 14 Mykola Krachkovsky 2019-04-30 08:56:58 UTC
Oh, I've missed there is new action. Then everything should be fine. I'm closing it and thanks again!