wmyywm / eclipse-code-formatter-intellij-plugin

Automatically exported from code.google.com/p/eclipse-code-formatter-intellij-plugin
0 stars 0 forks source link

@formatter:off is not considered #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've got regions that are not thought to be formatted. Like

//@formatter:off
this.
    portion.of(code
); // will not be touched by the formatter
//@formatter:on

When I format that code with eclipse code formatter then it will be formatted to

// @formatter:off
    this.portion.of(code
        ); // will not be touched by the formatter
// @formatter:on

I expect that the formatter does not touch the code inside of @formatter tags 
like eclipse ignores it.

Original issue reported on code.google.com by stefk...@gmail.com on 8 Aug 2013 at 1:22

GoogleCodeExporter commented 9 years ago
check your configuration file.

do you have these settings?
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" 
value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>

Original comment by vojta.kr...@gmail.com on 8 Aug 2013 at 1:28

GoogleCodeExporter commented 9 years ago
Actually, I have this entries but the colon has been escaped. It was 
value="@formatter\:off>"!
Thanks for the quick answer. Now it works and sorry for the inconvenience.

Original comment by stefk...@gmail.com on 8 Aug 2013 at 1:46

GoogleCodeExporter commented 9 years ago

Original comment by vojta.kr...@gmail.com on 8 Aug 2013 at 1:50