Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 407252 - [Formatter] The off tag is not respected at block comments
Summary: [Formatter] The off tag is not respected at block comments
Status: CLOSED DUPLICATE of bug 303519
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.2.2   Edit
Hardware: PC Windows 8
: P3 minor (vote)
Target Milestone: 4.8 M5   Edit
Assignee: Mateusz Matela CLA
QA Contact:
URL:
Whiteboard: To be verified for 4.8 M5
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-06 03:21 EDT by Oliver Kopp CLA
Modified: 2018-01-02 16:28 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kopp CLA 2013-05-06 03:21:55 EDT
The @formatter:off tag is not respected in block comments:

	/**
	 * @formatter:off
	 * This line gets moved
	 * @formatter:on
	 */
	public static void test() {
	}

gets

	/**
	 * @formatter:off This line gets moved
	 * @formatter:on
	 */
	public static void test() {
	}
Comment 1 Palmer Eldritch CLA 2013-12-17 08:16:49 EST
It is not only inside block comments :

class Test {
	
	// formatter:off
	/*
	private void meth() {
		// this will wrap
	}
	*/
}

Ctrl+shift+F

class Test {
	// formatter:off
	/*
	 * private void meth() { // this will wrap }
	 */
}

Should I fill a new one (as I intended originally) ?
Comment 2 Mateusz Matela CLA 2018-01-02 16:28:09 EST
I've checked both cases and they work correctly now (except that Palmer used "formatter:off" instead of "@formatter:off"), probably since the formatter rewrite in Eclipse Mars.

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