是否有用于Intellij(Android Studio)的插件,其中实体代码分别设置为属性,获取器和设置器?

问题描述 投票:1回答:1

是否有用于Intellij(Android Studio)的插件,其中实体代码的格式分别设置为属性,获取器和设置器?

输入:

public class Employee {
    private String name;
    private String department;
    // Getters and Setters
    private String employeeId;
    // Getters and setters
}

输出:

public class Employee {
    private String name;
    private String department;
    private String employeeId;
    // Getters and setters
}
android-studio intellij-idea entity getter-setter code-formatting
1个回答
0
投票
在编辑器中,按下

Shift+Ctrl+Alt+L会弹出重新格式化文件对话框。在这里,您可以选择“重新排列代码”。它应该可以解决问题。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.