I'm used to write code in a such way:
private String blabla()
{
return "bla";
}
But Android Studio is adjusted for this code:
private String blabla() {
return "bla";
}
Question: how can I change this option for me?
The path is: File > Settings (Ctrl + Alt + S) > Editor > Code Style > Java. Then select your relevant tab.
Out of the box, IntelliJ IDEA allows you to import settings in the IntelliJ IDEA code style XML or Eclipse XML Profile format. Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style. and select Import Scheme. Then select the necessary format.
Code style scheme settings are automatically applied every time IntelliJ IDEA generates, refactors, or reformats your code. The IDE comes with two pre-defined schemes: the Project scheme and the Default scheme. In the Project scheme, the settings that you configure apply only to your current project.
Press Ctrl+Alt+S to open the IDE settings and select Tools | Actions on Save. Enable the Reformat code option.
Go to File -> Settings.
Then in dialog, Editor -> Code Style -> Java -> Wrapping and Braces tab, then you can adjust braces placement
Remember to "Apply" your changes.
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