I love the Eclipse feature that allows the Formatter Profile to be applied on save, but what if my preferred bracing style differs from the project "standard"? Is there a way to apply one Formatter Profile when I open a file, and another when I save it?
I suppose there would be complications when debugging, but maybe there's some brilliant Eclipse Plugin developer that has solved this problem. I can hope, right开发者_如何学运维?
Not to my knowledge for Java sources.
Especially since, at the first saved modification, the bracing style would then revert to the second Formatter profile, hence modifying the reading experience.
Plus that would required a mandatory recompilation on project/source opening, for the debug informations to be correctly stored.
The only kind of formatting I know about are for non-compiled files, like xml ones.
OxygenXml has such a setting in place, with PrettyPrint.
Format and indent the document on open
When checked, the Format and indent the document on open operation will format and indent the document before opening it in the editor panel.
精彩评论