Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 177229 - Indent problem with multiple loops or if conditions
Indent problem with multiple loops or if conditions
Product: cnd
Classification: Unclassified
Component: Editor
All Linux
: P3 (vote)
: 6.x
Assigned To: Alexander Simon
Depends on:
  Show dependency treegraph
Reported: 2009-11-19 11:03 UTC by TheDestroyer
Modified: 2010-01-26 06:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description TheDestroyer 2009-11-19 11:03:41 UTC
Dear Sir,

The problem is very simple, it happens when I, for example, create a loop or if condition without braces. The compiler reads the next line as the loop content or the if condition content, and uses the next second next line as it's not included in the loop or the if condition, for example:


In this code, the compiler posts only the i value for 10 times, which of course changes during the loop, and the "Hello" message only once, considering it not in the loop.

The problem in your program, is that when I do this, with 3 loops, the second next line after the loop keeps another indent, for example:

         //contents of the last loop
      //the next line starts from here, while it should take no indents at all.

I hope you check this and fix it.

Thank you,
Comment 1 Jiri Prox 2009-11-20 02:55:44 UTC
In Java this works as expected, reassigning to cnd for evaluation
Comment 2 Alexander Simon 2010-01-09 04:09:21 UTC
fixed, change set:
Comment 3 Quality Engineering 2010-01-09 23:40:28 UTC
Integrated into 'main-golden', will be available in build *201001100200* on (upload may still be in progress)
Log: fixed BZ#177229 Indent problem with multiple loops or if conditions
Comment 4 Alexander Pepin 2010-01-15 07:12:06 UTC
verified in trunk build 201001150201
Comment 5 pgebauer 2010-01-18 05:55:20 UTC
The fix has been ported into the release68_fixes repository.
Comment 6 Alexander Pepin 2010-01-26 06:51:41 UTC
verified in patch1 candidate

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo