Bug 44651 - Wrong formatting of multiple local variables declarations
Summary: Wrong formatting of multiple local variables declarations
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-10 10:18 EDT by Frederic Fusier CLA
Modified: 2003-11-19 10:53 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 Frederic Fusier CLA 2003-10-10 10:18:38 EDT
Using new formatter in build 3.0 M4 (I20031009), when formatting code:
public class X {
	String str1 = "toto", str2 = "titi", str3 = "tata";
	
	void foo() {
		String str1 = "toto", str2 = "titi", str3 = "tata";
	}
}

I get:
public class X {
	String str1 = "toto", str2 = "titi", str3 = "tata";
	void foo() {
		String str1 = "toto", 
		str2 = "titi", 
		str3 = "tata";
	}
}

Note that long multiple instance variables declaration (not shown entirely as 
bugzilla break the line :(, so put some... instead):
public class X {
	String str1 = "xxxxxxxxxx", ...,str10 = "xxxxxxxxxx";
}
are well formatted:
public class X {
	String str1 = "xxxxxxxxxx",
			str2 = "xxxxxxxxxx",
			str3 = "xxxxxxxxxx",
			str4 = "xxxxxxxxxx",
			str5 = "xxxxxxxxxx",
			str6 = "xxxxxxxxxx",
			str7 = "xxxxxxxxxx",
			str8 = "xxxxxxxxxx",
			str9 = "xxxxxxxxxx",
			str10 = "xxxxxxxxxx";
}
Comment 1 Olivier Thomann CLA 2003-10-10 12:22:03 EDT
Fix is ready.
Regression test added.
Comment 2 Olivier Thomann CLA 2003-10-10 16:22:16 EDT
Fixed and released in HEAD.
Regression test added.
Comment 3 David Audel CLA 2003-11-19 10:53:31 EST
Verified.