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 185649 - [69cat] bad indentation on ternary statement
Summary: [69cat] bad indentation on ternary statement
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 22:16 UTC by ulfzibis
Modified: 2010-10-19 14:53 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 ulfzibis 2010-05-06 22:16:23 UTC
[ BUILD # : 201005050200 ]
[ JDK VERSION : 1.6.* ]

Write:
        return cp == 0 ?
and hit return. Result (indentation is only 4):
        return cp == 0 ?
            "foo" : "bar";

Indentation should be 8 like:
        return cp == 0 ?
                "foo" : "bar";
Comment 1 ulfzibis 2010-06-16 14:49:34 UTC
If "Return" is hit before the '?', the indentation is completely missing.
Example:
        out.append(item instanceof EntryList
        ? "\n"+new Statistics((EntryList)item) :
            ", "+item);
Comment 2 Dusan Balek 2010-10-19 14:53:50 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/62d7737905e6