Bug 167820 - Code formatter: removing space after 'return' and 'throw' does not work
Summary: Code formatter: removing space after 'return' and 'throw' does not work
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-13 05:14 EST by Markus Keller CLA
Modified: 2007-02-05 11:46 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2006-12-13 05:14:00 EST
I20061212-0010

The checkboxes for code formatter settings White Space > Insert space: > Control statements > 'return'/'throw' > before parenthesized expression do nothing.

When formatting the class below, a space is always added. The preview also does not show a change. In 3.3M3, the option for 'return' worked as expected.


public class Foo {
	public void test() throws Exception {
		throw(new IllegalStateException());
	}
	
	int m() {
		return(1);
	}
	
	protected void tearDown() throws Exception {
		throw new IllegalStateException();
	}

	int xyz() {
		return 1;
	}
}
Comment 1 Martin Aeschlimann CLA 2006-12-15 16:48:19 EST
This seems to work fo me in I20061214-1445: In the preferences preview, as well when formatting. Maybe you have some other settings that override that setting? Olivier?
Comment 2 Markus Keller CLA 2006-12-15 17:21:47 EST
I have 'White Space > Expressions > Parenthesized expressions > before opening parenthesis' checked. If I uncheck that option, then the problem from comment 0 disappears.

I don't have a good idea right now how to make such dependencies more visible. OK to close if think it's OK as it is.
Comment 3 Olivier Thomann CLA 2006-12-22 15:29:22 EST
Different options might indeed interfere.
No way to prevent this kind of side effect.
Closing as INVALID.