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 124625 - Formatter: Editor auto-indentation errors on nested braces
Summary: Formatter: Editor auto-indentation errors on nested braces
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-03 07:12 UTC by jbhannah
Modified: 2008-04-15 12:18 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 jbhannah 2008-01-03 07:12:17 UTC
I have found two distinct auto-indentation errors in the editor, both occurring with braces {} insertion in nested code
blocks.

First, when entering the following:

class Test {
    function test() {
        return true;
    }

    function test2() {
        return true;
    }
}

when I type the { after function test2(), that line is indented again, resulting in:

class Test {
    function test() {
        return true;
    }

        function test2() {
            return true;
        }
}

Similarly, with the following:

class Test {
    function test() {
        return true;
    }
    function test2() {
        return true;
    }
}

(note the ABSENCE of a newline before function test2(); the class-function thing is just an example of nested code
blocks to demonstrate) when typing the { after function test2() the line indentation is DECREASED, resulting in:

class Test {
    function test() {
        return true;
    }
function test2() {
    return true;
}
}

No indentation errors occur, in either case, with function test(), or with class Test. These are probably related. This
occurs with the latest version of Netbeans and the PHP plugin (both installed today), on Java 1.6.0_03.
Comment 1 Tomasz Slota 2008-04-09 09:24:51 UTC
Vito please evaluate if this issue is still valid in the current implementation
Comment 2 Vitezslav Stejskal 2008-04-15 12:18:07 UTC
This is working fine in current dev builds.