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 175118 - Wrong indendtation after do {} while
Summary: Wrong indendtation after do {} while
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks: 174873
  Show dependency tree
 
Reported: 2009-10-21 15:09 UTC by Petr Pisl
Modified: 2009-10-22 23:49 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 Petr Pisl 2009-10-21 15:09:44 UTC
function test() {
        do {
            echo "test";
        } while ($condition);             // press ENTER here
    |                                                // you will get here
    }

I have separated this issue from issues #173937 and from issue #173906 to track better this problem and usually is not 
good to mentioned different cases in one issues like in the mentioned.


This case covers also other examples, like foreach, where there is no {}. Other examples (| mark position, where to put 
new line.

   foreach ($a as $value) $value; |


   foreach ($a as $value) 
       $value;|


   if (true) return false; |


   if (true)
       return false;|

   if (true)|


etc.
Comment 1 Petr Pisl 2009-10-21 15:52:00 UTC
Fixed in web-main
Comment 2 Quality Engineering 2009-10-22 23:49:34 UTC
Integrated into 'main-golden', will be available in build *200910221401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/274b54513687
User: Petr Pisl <ppisl@netbeans.org>
Log: issue #175118 - Wrong indendtation after do {} while