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

2015-12-30_19h07_40

2015-12-30_19h08_20

Configuration

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

2015-12-30_19h10_22

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"/>

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

Clone this wiki locally