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 161197 - [67cat] Code completion indents code too much
Summary: [67cat] Code completion indents code too much
Status: RESOLVED DUPLICATE of bug 160995
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-25 22:02 UTC by dancehands
Modified: 2009-03-31 09:39 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 dancehands 2009-03-25 22:02:08 UTC
On today's daily build (200903250219) when I start typing a PHP function, hit CTRL-SPACE to see the list, and then
select one and hit ENTER, the current line of code is always indented 1 time from where it was. I have to unindent every
time.
Comment 1 Dusan Balek 2009-03-26 10:22:26 UTC
Reassigning to PHP.
Comment 2 neilg 2009-03-27 22:45:21 UTC
I see this same problem in the jsp editor, but only when the code hasn't been formatted with alt-shift-f.

Once the code has been formatted the jsp editor handle indents correctly.
Comment 3 blakenzoe 2009-03-31 06:51:04 UTC
It only seems to happen if there is a blank line above the line on which you are trying to perform a code completion, or
if the line above is an opening brace.

Or conversely, it seems to function correctly when the previous line contains PHP commands.

This defect was introduced between 200903021401 (worked fine) and 200903121546 (broken).

Examples:

class MyClass
{
    public function myFunc()
    {
            $theVar1 = date_create();<<-CODE-COMPLETION WILL INCORRECTLY INDENT HERE
        $theVar2 = date_create();<<-CODE-COMPLETION INDENTS CORRECTLY
        $theVar3 = date_create();<<-CODE-COMPLETION INDENTS CORRECTLY

            $theVar4 = date_create();<<-CODE-COMPLETION WILL INCORRECTLY INDENT HERE

    }
}

Comment 4 Tomasz Slota 2009-03-31 09:39:06 UTC

*** This issue has been marked as a duplicate of 160995 ***