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.

Bug 213106 - code folding: collapse by default
Summary: code folding: collapse by default
Status: RESOLVED WONTFIX
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-28 14:41 UTC by pna
Modified: 2012-09-17 08:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pna 2012-05-28 14:41:03 UTC
Product Version = NetBeans IDE 7.2 Beta (Build 201205031832)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_02
Runtime = Java HotSpot(TM) Client VM 22.0-b10

In Tools->Options->Editor the Collapse by Default option for methods is linked together with php structures (if, try, ...). so you can not switch off both independently.
Comment 1 Ondrej Brejla 2012-05-28 14:58:27 UTC
We don't have a better solution. It could be handled only by "Method" blocks, or "Tags and other code blocks" (which handles Classes).

I think that it's better to handle it together with methods.

We can't handle that separately, because CSL infrastructure doesn't support it (whole IDE infrastructure doesn't support it either) Resp. in Java, you can't fold classes - just inner classes, so you can use that "Tags and other code blocks" option for these statements...for, if, while, etc.

But in PHP, classes are foldable and since there is no "Classes" option, they are handled by that "Tags and other code folds". So sorry, but it can't be fixed now.

But I'll file an enhancement for CSL infrastracture to enable customizing of "Inner Classes" folding...we can rape it and use it for folding of PHP classes.

Then "Tags and other code blocks" can be used for if, else, etc. statements.
Comment 2 Ondrej Brejla 2012-05-28 15:03:08 UTC
More description in issue #213107
Comment 3 pna 2012-05-28 16:53:10 UTC
Thanks for the reply. I understand but it is not RESOLVED ;)

Maybe there is a possibility to switch it off in any config file?

The thing is if you have many methods with only a few lines in it (oop) it is very useful to fold the methods by default. But then to extra unfold "nearly everything" inside these tiny methods is simply unusable.
Comment 4 sonnysavage 2012-07-02 13:23:16 UTC
This is a new issue with version 7.2. Cold folding didn't behave this way in 7.0 or 7.1.

> We can't handle that separately, because CSL infrastructure doesn't support it
(whole IDE infrastructure doesn't support it either)

Has a new CSL infrastructure been introduced in 7.2?
Comment 5 Ondrej Brejla 2012-09-17 08:51:10 UTC
It's wontfix since we can't handle that behavior. Report a new issue for Editor/Code folding to allow disabling this "autofolding" behavior.

That issue with folding php structures (if, do, while, ...) together with methods has been fixed today.