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.
It would be great to have the ability to fold not just code blocks but everything in selection.
Do you mean an arbitrary portion of text, regardless of original structure (i.e. fold may start before if-code-block and end within the block) ? What is the use-case for such feature - please elaborate.
Sorry, now I see I was ambiguous. Let me specify: not an arbitrary portions, but a several code blocks at once. Currently one have to fold them one by one, if there are many code blocks of the same level.
OK, this seems trivial. Let's say the the action would fold all foldable ranges which are at least partially selected (so you don't have to make precise selections) ?
I can't say for all, but for me it would be more understandable if folding only worked for fully selected blocks. And they were folded into one folding point, not into each own.
(In reply to iii from comment #4) > I can't say for all, but for me it would be more understandable if folding > only worked for fully selected blocks. And they were folded into one folding > point, not into each own. Folding into one fold is rather peculiar: folds (so far) do not have any firm identity, so positions remain the only "handle" for the grouped folds - I think the function would be rather fragile - easily broken by various edits. See issue #239801 for a possible alternative feature - especially if the selected folds should always act as a group
What do you mean broken? Fold will be expanded? About issue #239801: I don't think that the vendor specific IDE hints is the right solution, but I like the idea of having default state for the folds. Ideally I would like to leave the task of remembering fold's state among restarts or file open/close events to the IDE (IntelliJ does that).