Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 422870

Summary: [Code Formatter] Inserting a comment after an annotation breaks formatting
Product: [Eclipse Project] JDT Reporter: Palmer Eldritch <the.ubik>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, mateusz.matela
Version: 4.3   
Target Milestone: 4.5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
my formatting profile none

Description Palmer Eldritch CLA 2013-11-29 12:17:58 EST
Created attachment 237872 [details]
my formatting profile

class Test {

	@Override
	// yada yada
	public String toString() {
		return null;
	}
}

Hit Ctrl+Shift+F. Get :

class Test {

	@Override
	// yada yada
			public
			String toString() {
		return null;
	}
}

I attach my formatting profile

The comments formating may prove a can of worms : see also :

https://bugs.eclipse.org/bugs/show_bug.cgi?id=419909
https://bugs.eclipse.org/bugs/show_bug.cgi?id=396686

Please show them some love :)
Comment 1 Dani Megert CLA 2013-12-03 06:50:07 EST
Works fine with the default profile, but I can reproduce the bug in 4.4 M3 with the given profile.

I assume you don't know which changed option causes it?
Comment 2 Palmer Eldritch CLA 2013-12-03 09:32:45 EST
You are very right in your assumption :)
Comment 3 Mateusz Matela CLA 2015-12-26 15:52:52 EST
This problem no longer occurs after the formatter redesign.

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