Reputation: 109
I have after save actions that do auto format, organize imports and lots of other things. But we do use some autogenerated code too and formatting is not welcome on such code. Is there any plugin, or option for Eclipse to turn off or ignore save actions when the file is located in some directory that I will specify by mask or regex?
Upvotes: 1
Views: 416
Reputation: 111142
There is no support for changing the save actions based on the directory or a pattern.
You can have different save actions for different complete projects. So if you can put your autogenerated code in a separate project you could use that.
You can also stop the formatter from doing anything by adding the comments
// @formatter:off
// @formatter:on
in the source code (you can configure exactly what these are in the formatter preferences).
Upvotes: 2