This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Enhance control of code folding | ||
---|---|---|---|
Product: | editor | Reporter: | berniev |
Component: | Code folding | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | Eccenux, schlaefer |
Priority: | P3 | Keywords: | PLAN |
Version: | 7.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
berniev
2012-08-01 00:13:10 UTC
*** Bug 213218 has been marked as a duplicate of this bug. *** Planning for 7.4. The recursive unfold should be possibly by both mouse gestures in the outline bar, and by popup menu actions, with the option to assign keyboard shortcuts to them. BTW - what is the scenario for "close current fold and enclosed folds" ? I understand the "expand subtree" drilldown case ... but collapse ? CTRL SHIFT [+] is already assigned to "expand all", so the next sensible shortcut would be CTRL-SHIFT-[*] (numpad star/multiply) Consistency: For each open option an equivalent collapse option. IMHO it's much easier if you don't have to remember whether a permutation is implemented or not. If I close(all) a chunk of code, I know it will reopen in a clean, all nested folds closed state, not with some nested folds open and some closed from previous fiddling. On the other hand if I just close a fold, I would reasonably expect that when I reopen it, the previous state of nested folds will be restored. I have no opinion re keys, my brain only remembers the shortcut keys I use lots! Not being a nix guru I prefer to work visually using mouse for most things (suspect I am not alone), hence the proposal re the mouse actions on the code fold symbol on screen. Implemented in http://hg.netbeans.org/jet-main/rev/b9627ba36fd2. The recursive collapse/expand can be achieved when holding SHIFT and clicking on the fold sign. In addition, shortcuts CTRL-Num* (expand), CTRL-Num/ (collapse), alternatively CTRL-ALT-[+], CTRL-ALT[-]. Should be CMD-ALT-[+-] on mac. Fantastic! I am curious though why the original suggestion to include a right-click based option was apparently not adopted. Many other options are available this way and without it this wonderful feature is rather hidden, unless you know to go looking for it. Integrated into 'main-golden', will be available in build *201305021042* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b9627ba36fd2 User: Svata Dedic <sdedic@netbeans.org> Log: #216226: Implemented recursive expand/collapse, shortcuts added. Enabled for CSL-based editors |