Bad (what IntelliJ does):
return !enabled ||
(
!name.isBlank() &&
!email.isBlank() &&
!phone.isBlank()
);
Better (what I want it to do):
return !enabled ||
(
!name.isBlank() &&
!email.isBlank() &&
!phone.isBlank()
);
Is there a way to configure IntelliJ IDEA to not add the extra indentation for multi-line boolean statements?
I also don't like the formatting when writing HQL (or any multi-line string), eg:
Bad:
@Query(
"SELECT x " +
"FROM Something x " +
"WHERE " +
"blah = 1 AND " +
"name = 'blah'"
)
Good:
@Query(
"SELECT x " +
"FROM Something x " +
"WHERE " +
"blah = 1 AND " +
"name = 'blah'"
)
Is there a way to configure IntelliJ IDEA to format HQL the way I like it (shown here)?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.