Bug 443295 - Add keybinding 'collapse all' to ctrl+shift+numpad-minus
Summary: Add keybinding 'collapse all' to ctrl+shift+numpad-minus
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-04 06:25 EDT by Alex Blewitt CLA
Modified: 2020-11-12 11:16 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Blewitt CLA 2014-09-04 06:25:03 EDT
The 'expand' and 'collapse' actions are ctrl+numpad* and ctrl+numpad-. However, expand all and collapse all are ctrl+shift+numpad* and ctrl+shift+numpad/ -- futhermore, ctrl+numpad/ is 'toggle folding on and off'

It would make more cognitive sense if the 'collapse all' was bound to ctrl+shift+numpad- (as well as ctrl+numpad/) so that expand is * and collapse is -, whilst 'all' is just adding shift.

I note that ctrl+numpad+ is the same as ctrl+numpad* in a Java editor; perhaps the same suggestion there (use shift for all) would be appropriate.
Comment 1 Dani Megert CLA 2014-09-04 10:08:52 EDT
I agree this would make sense. I can't tell why we chose the current bindings. Maybe there was/is a conflict on some OS. We'd definitely have to check that first.

Also, if we do this, we must change the Text and the UI command bindings.
Comment 2 Markus Keller CLA 2014-09-04 13:59:17 EDT
* Windows trees traditionally support:
Numpad+ for Expand
Numpad- for Collapse
Numpad* for Expand All (children)
(unsupported: Collapse All children)
Note that the native actions also work if you add Shift or Alt (but not Ctrl).

GTK is similar (* expands one more level on repeated presses; - is Collapse All).


* Eclipse textual editors (Text Editing category) adapted this schema to:
Ctrl+Numpad+ for Expand
Ctrl+Numpad- for Collapse
Ctrl+Numpad* for Expand All Foldings (not only children)
Ctrl+Numpad/ for Toggle Folding on/off
... and a bit later also:
Ctrl+Shift+Numpad* for Restore Structure
Ctrl+Shift+Numpad/ for Collapse All Foldings (not only children)

* At last these general commands (Navigation category) were added for views with trees (opt-in, i.e. doesn't work everywhere):
Ctrl+Shift+Numpad* for Expand All (really all, not only children)
Ctrl+Shift+Numpad/ for Collapse All (really all, not only children)

Alex, could you please restate what exactly you'd like to change?
The platform will not define multiple bindings for the same command (need to keep some shortcuts free for others).
Comment 3 Dani Megert CLA 2014-09-04 14:12:48 EDT
(In reply to Markus Keller from comment #2)
> Alex, could you please restate what exactly you'd like to change?
> The platform will not define multiple bindings for the same command (need to
> keep some shortcuts free for others).

I think he wants 'Shift' to be used as the 'All' modifier, i.e.

Ctrl+Numpad_- == Collapse
Ctrl+Shift+Numpad_- == Collapse

Ctrl+Numpad_+ == Expand
Ctrl+Shift+Numpad_+ == Expand All
Comment 4 Hamid Raza CLA 2020-11-12 11:16:16 EST
Here you go!

1. Right Click on + button appeared on numbering strip on left most side --> Folding --> Expand All
2. Right Click on + button appeared on numbering strip on left most side --> Folding --> Collapse All

This way you can expand and collapse all the methods on the file.

[Plus Buttons on numbering strip][1]


Context Menu:

[Context Menu][2]


  [1]: https://i.stack.imgur.com/bxrTK.png
  [2]: https://i.stack.imgur.com/hcVLY.png