I'm looking for an automatic way in eclipse to reformat curly braces to K&R style, eliminating braces for single statements if, etc. Is there such a way?
Thanks.
Before you reformat you need to customize the formatter settings in the Preferences Dialog Java/ Code Style / Formatter
to your K&R settings if the default settings don't match your requirements.
The Preferences Dialog is opened from Mainmenu / Window / Preferences
You can even configure a save action Java / Editor / Save Action
to format source code on save.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With