Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 178867 - Wrong indentation: nested "for", "if", etc without curly braces
Wrong indentation: nested "for", "if", etc without curly braces
Product: cnd
Classification: Unclassified
Component: Editor
PC All
: P3 with 1 vote (vote)
: 6.x
Assigned To: Alexander Simon
formatting, 68patch1-verified
Depends on:
  Show dependency treegraph
Reported: 2009-12-18 09:33 UTC by gene91
Modified: 2010-01-26 06:57 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 gene91 2009-12-18 09:33:42 UTC
The editor failed to indent correctly on the following cases.

for (int i=0; i<n; i++)
  for (int j=0; j<n; j++)
^   ^//The first "^" indicate the correct indentation while the editor believes the latter would be right.

for (...)
  if (...)
    //same problem here.

And the problem also exists in situations where deeper nesting is involved, for example, the 4-level nesting when coding Floyed-Warshall algorithm.
Comment 1 Alexander Simon 2010-01-09 03:37:49 UTC
fixed, change set:
Comment 2 Quality Engineering 2010-01-09 23:40:59 UTC
Integrated into 'main-golden', will be available in build *201001100200* on (upload may still be in progress)
Log: fixed BZ#178867 Wrong indentation: nested "for", "if", etc without curly braces
Comment 3 Alexander Pepin 2010-01-15 06:57:49 UTC
verified in trunk build 201001150201
Comment 4 pgebauer 2010-01-18 05:45:54 UTC
The fix has been ported into the release68_fixes repository.
Comment 5 Alexander Pepin 2010-01-26 06:57:50 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