Code Style :: add empty line before any comment
已回答
Is there a way for me to set my Code Style settings such that an empty line is added before each comment block?
before reformate code is called
public void foo1() {
// test comment 1
public void run();
// test comment 2
public void run();
// test comment 3
public void run() {
}
}
and after reformat Ctrl+Alt+L is called
public void foo1() {
// test comment 1
public void run();
// test comment 2
public void run();
// test comment 3
public void run() {
}
}
请先登录再写评论。
There is no such setting for comments, but in your specific case the following option can help: Settings (Preferences on macOS) | Editor | Code Style | Java | Blank Lines | Minimum blank lines | Around method: 1.