Bug 51190 - comment after else block goes to next line
Summary: comment after else block goes to next line
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-04 14:47 EST by Rafael Chaves CLA
Modified: 2004-02-12 14:38 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 Rafael Chaves CLA 2004-02-04 14:47:14 EST
i20040204

Formatting the class below using the default code formatter settings moves //YYY
to the line below. This is undesirable since I cannot use comment-based tags
(such as $NON-NLS-X$ tag in the else block.

public class XXX {
	public void foo() {
		int x = 0, y = 0;
		if (true)
			x = 1;//XXX
		else 
			y = 10;//YYY
	}
}

is formatted as:

public class XXX {
	public void foo() {
		int x = 0, y = 0;
		if (true)
			x = 1;//XXX
		else
			y = 10;
		//YYY
	}
}
Comment 1 Olivier Thomann CLA 2004-02-05 11:39:32 EST
Fixed and released in HEAD.
Regression test added.
Comment 2 Olivier Thomann CLA 2004-02-12 14:38:37 EST
Verified in 200402121200.