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 144776 - Folds unfold when a code block is started using a curly bracer
Summary: Folds unfold when a code block is started using a curly bracer
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-21 20:56 UTC by mcajvar
Modified: 2008-08-30 05:30 UTC (History)
0 users

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 mcajvar 2008-08-21 20:56:08 UTC
In NetBeans IDE 6.5 beta (in truth, this was also present in milestone 1) when I have a php file with a class
definition, upon starting to write a new method or any block within the class definition, using the opening "{" char,
all folded folds get unfolded, which makes editing kind of annoying at times.
I have tried this ina file with some folded functions and strting to write a new function, the folds seem to stay folded
in this case. This seems to only happen when I'm starting to write a new block of code within a class definition.
Sample code is below, try putting it in a new file, fold everything and remove the closing curly bracer in a statement
in a function or in the class' method and see what happens.

function cookies_for_everyone() {
    $ingeniousMessage = "Not doing anything much, really";
    for ($i = 1; $i < 3; $i++) { echo $ingeniousMessage; }
}
function only_doughnuts_left() {
    if (true) {
        return false;
    }
}
class ReallyJustADemo {
    function i_am_a_method() {
        if (true) {}
    }
}
Comment 1 virtualdarkness 2008-08-21 22:45:43 UTC
I confirm this; you can test it also having netbeans to automatically fold Javadoc comments in a file with a lot of
comments and then try to write something like "function test() {" and you'll see all the Javadoc comments unfolded until
you hit return and the closing "}" is automatically added.
Comment 2 Petr Pisl 2008-08-29 13:48:16 UTC
I have done many improvements in this area. This is not still perfect, but much better. Please reopen if you find out
case, when it is broken.
Comment 3 Quality Engineering 2008-08-30 05:30:41 UTC
Integrated into 'main-golden', available in build *200808300201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/e552ea7c50df
User: Petr Pisl <ppisl@netbeans.org>
Log: #144776 - Folds unfold when a code block is started using a curly bracer
Not perfect fix, but probably the best for NB 6.5