Confgure IntelliJ to add blank line before return statement

已回答

 

 

Is there a way to configure IntelliJ to automatically insert a blank line before return statement when using CTRL + ALT + L? Here's how my code looks:

    public static String getValue() {
    String some = "a";
    String another = "bb";
    return some;
}

I would like it to reformat to (CTRL + ALT + L):

    public static String getValue() {
    String some = "a";
    String another = "bb";

    return some;
}
0

No, there is no such option in the Java code formatter.

0

any alternatives? some plugins? 

0

If you find any third-party formatter that is compatible with IntelliJ IDEA and supports this option, you can use it instead of the default formatter.

There is https://plugins.jetbrains.com/plugin/6546-adapter-for-eclipse-code-formatter, but not sure if Eclipse formatter has this feature.

0

请先登录再写评论。