Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 419909 - comments are grouped together when Blank Lines > Number of empty lines to preserve is set to 0
Summary: comments are grouped together when Blank Lines > Number of empty lines to pre...
Status: CLOSED DUPLICATE of bug 303519
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.5   Edit
Assignee: Mateusz Matela CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-19 12:18 EDT by Palmer Eldritch CLA
Modified: 2015-12-26 15:55 EST (History)
2 users (show)

See Also:


Attachments
formatting preferences (30.45 KB, text/xml)
2013-10-19 12:18 EDT, Palmer Eldritch CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Palmer Eldritch CLA 2013-10-19 12:18:07 EDT
Created attachment 236687 [details]
formatting preferences

One patch = 1000 words. On formatting :

 	private static volatile String uuid; // volatile needed - see EJ item 71
-	// need lazy initialization to get a context

+	// need lazy initialization to get a context
 	/**
 	 * javadoc omitted
 	 */
 	public static String getDeviceIdentifier(Context ctx,
 			boolean ignoreBuggyAndroidID) throws DeviceIDException {


As you see the formatter relates the comment to the next block of "declarations of the same kind". The formatter should detect there is a comment in the previous line and continue streaming the comment. This is an example of the line comments being "second line citizens" - see the blocked bug at https://bugs.eclipse.org/bugs/show_bug.cgi?id=396686.

I attach my formatting preferences

Thanks
Comment 1 Mateusz Matela CLA 2015-12-26 15:55:24 EST
This problem no longer occurs after the formatter redesign.

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