Skip to content

Support of @formatter:off

markiewb edited this page Dec 30, 2015 · 3 revisions

This plugin supports also the @formatter:off/@formatter:on notation to turn of the formatter for certain code sections.

Feature

Configuration

To enable this the formatter (and so in result the formatter file) must be configured to support this.

See http://stackoverflow.com/questions/1820908/how-to-turn-off-the-eclipse-code-formatter-for-certain-sections-of-java-code#3353765

In the end the formatter file must contain

<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>

Clone this wiki locally