Product Version = NetBeans IDE Dev (Build 201203050400)
Operating System = Linux version 2.6.35-32-generic running on amd64
Java; VM; Vendor = 1.6.0_20
Runtime = OpenJDK 64-Bit Server VM 19.0-b09
The IDE is automatically collapsing all looping structures on a page when it's opened - and- in the options I do not have "Tags and Other Code Blocks" checked.
Also, when I'm working on the code the ide is automatically collapsing code blocks as I work which is so annoying.
Another problem is that the code folding should not effect code that occurs on a single line.
Another bug is that when it does collapse, lets say an if/else statement for example, that's on a single line, you cannot expand it by clicking the plus as only the code after the if is expanded. The only way to expand the code after the else is to double-click it.
The only way that I've found to be able to work on my scripts is to expand everything when I first open the file and then manually collapse all of the functions. And, fyi, expand all doesn't always work.
At this point, it would be better for you guys to not include these new code folding features into 7.2 unless your going to spend the time to get them working right.
A few other upgrades to code folding that would make it on par with other IDE's:
1. In the Code Folds menu's add "Collapse/Expand All Function/Methods" & "Collapse/Expand All Comments"
2. Right mouse click options to expand everything a selected code block.
3. Cache the folded state of each file so that it can be restored to it's previous state when it's re-opened. This would make the "Collapse By Default" options apply to only newly opened files.
4. Stop the IDE from automatically collapsing code while a file is being edited.
Too many things in one issue. There should be one issue for every single problem (some of them are enhancement, some are workning for me, some are won't fix, etc...). At first try to use IDE with a new userdir (clear instal, don't import anything from previous versions).
Autocollapsing -> can't reproduce it (I have collapsed everything, I switch off autocollapsing of methods, tags, etc., reopen the IDE, and everything is expanded)
Collapse when writing code -> I can reproduce...quite annoying behavior
Single line -> enhancement
Double click -> won't fix (there is no other solution in the folding infrastructure -> not PHP module problem)
Expand all: works for me properly
It's in the dev build...and it's there for testing purposes...to let you, our "dev build users", test it and find bugs...and that's exactly what you are doing now, aren't you? We are not able to find all bugs...so you have to help us. And that's why we are releasing dev build...
Just one note to "autocollapsing when editing", it happens in 7.1.1 as well. It's there for a long time...and I'm not sure, that it's a PHP module problem. We are just providing some offset ranges to folding infrastructure (from CSL API modules)...have to investigate it more.
And just to clarify...the behavior with new "folding blocks" is still the same as it was in previous versions (from PHP module point of view), we now just provide more offset blocks, so the "whole folding behavior" is still the same.
Autocollapsing: I trigger it all the time in 7.2beta. Even when typing in a block:
(Product Version: NetBeans IDE Dev (Build 201206130001))
I'm not sure if do something wrong, but productivity clearly went down with the new code folding feature. Until http://netbeans.org/bugzilla/show_bug.cgi?id=213107 is implemented imho Netbeans shouldn't ship with small code folding activated.
For 2. there's a ticket: http://netbeans.org/bugzilla/show_bug.cgi?id=213218
As you can see...the both issues which affect this one are not caused by PHP modules...it has to be fixed there, I can't do anything with that on my side. Unfortunately. Hopefully they will fix it soon for next release.
And you can simply workaround it by switching autocollapsing off. I know, it's not so "cool" but...you know.
Hi, php editor is quite unusable because of this issue.
Is there an option, that it will be fixed earlier than in next release? Some 'puncove koule' could be a reward:D
If you mean that annoying autocollapsing when code template is applied (e.g. "fnc"), so it's the same behavior as in Java editor (if I have "Methods" option checked and type "Pm", it's pasted and collapsed)...maybe some great feature? :/
If you mean that issue, where collapsing of cycles, conditions and such is driven by "Methods" option...there is no other option since "Tags and Other Code Blocks" is owned by classes...and why? Because CSL doesn't implement an API for "Inner Classes" option. Just vote for issue #213107. Once it is implemented I can reimplement PHP folding. It's a one-line change. But until that, I think that it's better to have it under "Methods" then "classes...".
But with that "autocollapsing" I can't do anything :( You can file a new issue for Editor/Code Folding and you'll have my vote ;)
And afair this is one of my longes answers in BugZilla, so I think that I deserve that really tasty 'puncove koule', don't I? O:-)
Fixed in web-main #c2024d0d5ea7
Integrated into 'main-golden', will be available in build *201209180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Ondrej Brejla <email@example.com>
Log: #209284 - New PHP Code Folding nearly unusable