Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 434821 - [formatter] Comment at end of line messes with indentation
Summary: [formatter] Comment at end of line messes with indentation
Status: VERIFIED DUPLICATE of bug 303519
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.4   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.5 M7   Edit
Assignee: Manoj N Palat CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-14 04:20 EDT by Alex W CLA
Modified: 2015-04-27 08:09 EDT (History)
1 user (show)

See Also:


Attachments
XML for formatting settings (30.53 KB, text/xml)
2014-05-14 04:20 EDT, Alex W CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex W CLA 2014-05-14 04:20:18 EDT
Created attachment 243066 [details]
XML for formatting settings

Not sure if this is the right place...

Essentially, end-of-line comments seem to prevent proper indentation for try/catch blocks on my computer. Removing the comment makes the formatter work again. Putting it back breaks it. Eclipse 4.4 M7, build 20140508-1440. Attached is the XML for my formatting settings.

public class FormatterTest {
	public void doNothing() {
		new Thread(() -> {
			synchronized (this) {
				try {
					Thread.sleep(0); // blah
			} catch (final InterruptedException e2) {
				e2.printStackTrace();
			}
		}
		
	}	).start();
	}
}
Comment 1 Manoj N Palat CLA 2014-05-14 06:44:20 EDT
will take a look post luna
Comment 2 Manoj N Palat CLA 2015-04-07 08:06:14 EDT
Issue resolved by the umbrella bug 303519. Test case  committed via : http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=959aac6fcb83b61039c3ddae468ad5563b6ccb62

*** This bug has been marked as a duplicate of bug 303519 ***
Comment 3 Sasikanth Bharadwaj CLA 2015-04-27 08:09:06 EDT
Verified for M7 using I20150426-2000 build