Bug 296938 - Autoindention fails for conditional operator
Summary: Autoindention fails for conditional operator
Status: CLOSED DUPLICATE of bug 65463
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-04 12:29 EST by Peter Larsen CLA
Modified: 2009-12-07 07:01 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Larsen CLA 2009-12-04 12:29:42 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Build Identifier: M20090917-0800


If the conditional operation is split after '?' and the true expression is typecasted, then the next statement is indented wrong.

e.g:

public static int formaterror1() {
	int size = 0 < 10 ? 
		(int)10.0 : 
			20;
		return size;
}


public static int formaterror2() {
	int size = 0 < 10 ? 
		(int)10.0 : 20;
		return size;
}

the "return size;" are indented too much.
	


Reproducible: Always
Comment 1 Markus Keller CLA 2009-12-07 07:01:47 EST

*** This bug has been marked as a duplicate of bug 65463 ***