I like to use curly brackets in this fashion
void hello()
{
code();
}
When I press Ctrl + Shift + F in Eclipse it changes everything to
void hello(){
code();
}
The simplest and global way: Go to Window -> Preferences. Then in search put: "brace". Select -> Java -> Code Style-> Formatter After opening new window go to brace tab and change it as you prefer.
Window/Preferences/Java/Code style/Formatter view:
Create a new profile based on the eclipse built in, then go to braces tab and change "same line" to next line everywhere. Then set the new profile to default.
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