Open spottedmahn opened 4 years ago
@spottedmahn could you try the following:
// @formatter:off
...your code...
// @formatter:on
instead of
// @formatter:on
...your code...
// @formatter:off
As a debugging step? Or a final solution?
Also, pointing it at a profile that doesn't override the values, i.e. they are missing, produces the same "bug"
enabling_tag
and disabling_tag
not listed:
Is there any solution for this issue? I have the same problem, being unable to exclude code blocks from formatting.
Could you find the setting org.eclipse.jdt.core.formatter.use_on_off_tags
in the profile? This setting should be set to true
to enable the disabling_tag and the enabling_tag.
I had a look and it was set to false
. After changing the configuration and restarting the editor the tags work as expected. Thank you for your help! 😄
When I specify a formatter settings file, the disable/enable formatting tags are ignored.
Environment
Steps To Reproduce
// @formatter:off
&// @formatter:on
Sample project
Current Result
Code between
// @formatter:off
&// @formatter:on
is formattedExpected Result
Code between
// @formatter:off
&// @formatter:on
shouldn't be formattedAdditional Informations
Before auto-format:
After auto-format:
Format setting file: