Wenn if
Zustand ist sehr groß und nehmen mehr Linien dann Zustand und Körper einen Monoblock werden, weil Standard Spiegelstrich 4 und IDEA ausrichten mehrzeilige if
bis 4.IntelliJ IDEA-Code Style - Legen Sie eine leere Zeile oder zusätzliches indent nach mehrere Zustand
if (status != HttpStatus.OK.value()
|| doc.title().equals("Foo")
|| list.isEmpty()) {
logger.info("Awful readability.");
foobar();
ex.execute(this);
}
OR
if (status != HttpStatus.OK.value() ||
doc.title().equals("Foo") ||
list.isEmpty()) {
logger.info("The most horrible readability.");
foobar();
ex.execute(this);
}
Ablesbarkeit werden so lala. Dazu möchte ich nach Bedingung eine Leerzeile einfügen oder zusätzlichen Einzug für Bedingungen per AutoFormat einfügen.
if (status != HttpStatus.OK.value()
|| doc.title().equals("Foo")
|| list.isEmpty()) {
logger.info("Good readability.");
foobar();
ex.execute(this);
}
OR
if (status != HttpStatus.OK.value()
|| doc.title().equals("Foo")
|| list.isEmpty()) {
logger.info("Good readability.");
foobar();
ex.execute(this);
}
Leider kann ich etwas in Code Style Optionen nicht finden.
Zusätzliche Einzugsunterstützung? – jimmbraddock