[Java. Formatting] Add field in settings for moving semicolon to the newline in long call chains

IDEA-291765

GitOrigin-RevId: 916e53119ab293a78a56be3c13c7a62fbb8cbbf6
This commit is contained in:
Georgii Ustinov
2023-11-29 11:35:43 +00:00
committed by intellij-monorepo-bot
parent 902b941d41
commit d657d89ed1
3 changed files with 17 additions and 0 deletions
@@ -197,6 +197,11 @@ public class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
"BUILDER_METHODS",
"KEEP_BUILDER_METHODS_INDENTS");
consumer.showCustomOption(JavaCodeStyleSettings.class,
"WRAP_SEMICOLON_AFTER_CALL_CHAIN",
JavaBundle.message("wrapping.semicolon.after.call.chain"),
getInstance().WRAPPING_CALL_CHAIN);
consumer.showCustomOption(JavaCodeStyleSettings.class,
"ANNOTATION_PARAMETER_WRAP",
JavaBundle.message("wrapping.annotation.parameters"),
@@ -144,6 +144,17 @@ public class JavaCodeStyleSettings extends CustomCodeStyleSettings implements Im
public PackageEntryTable IMPORT_LAYOUT_TABLE = new PackageEntryTable();
/**
* <pre>
* builder.add()
* .sub()
* .multiply()
* ;
* ^
* </pre>
*/
public boolean WRAP_SEMICOLON_AFTER_CALL_CHAIN = false;
@WrapConstant
public int RECORD_COMPONENTS_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
public boolean ALIGN_MULTILINE_RECORDS = true;
@@ -1312,6 +1312,7 @@ wrapping.deconstruction.patterns=Deconstruction patterns
align.types.in.multi.catch=Align types in multi-catch
wrapping.text.blocks=Text blocks
wrapping.switch.statement.or.expression='switch' statement/expression
wrapping.semicolon.after.call.chain=Move ';' to the new line
wrong.package.statement=Wrong package statement
title.code.vision=Code vision
title.code.vision.inlay.hints=Code Vision