Bug 543080 - [formatter] wrapping binary expressions: separate options
for operator types - UI
Change-Id: Id4ca224beb5123111a2a42312c99c39314edaed7
Signed-off-by: Mateusz Matela <mateusz.matela@gmail.com>
diff --git a/org.eclipse.jdt.ui/preview/formatter.java b/org.eclipse.jdt.ui/preview/formatter.java
index 6d460ff..f15d82e 100644
--- a/org.eclipse.jdt.ui/preview/formatter.java
+++ b/org.eclipse.jdt.ui/preview/formatter.java
@@ -838,25 +838,42 @@
500 );}}
//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression
-//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_binary_expression
-class Example extends AnotherClass {int foo() { int sum= 100
- + 200
- + 300
- + 400
- + 500
- + 600
- + 700
- + 800; int product= 1
- * 2
- * 3
- * 4
- * 5
- * 6
- * 7
- * 8
- * 9
- * 10; boolean val= true && false && true && false && true; return product / sum;}}
-//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_binary_expression
+//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator
+//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_additive_operator
+//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_string_concatenation
+//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_shift_operator
+//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_relational_operator
+//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator
+//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_logical_operator
+class Example {
+
+boolean firstIsGreater = 11111111 + 22222222 +
+33333333 + 44444444 +
+55555555 + 66666666
+>
+1.11111111 * 2.22222222 * 3.33333333
+* 4.44444444 * 5.55555555 * 6.66666666;
+
+String concatenatedString = "one two three four " + "five six seven eight " + "nine ten eleven twelve";
+
+int shiftedInteger = 0xCAFEFACE >>> 0x00000001
+ >>>
+ 0x00000002
+ <<
+ 0x00000003 >>> 0x00000004;
+
+int bitAritmetic = 0xCAFEFACE | 0x01010101 & 0x02020202 ^ 0x03030303 ^ 0x04040404 | 0x05050505;
+
+boolean multipleConditions = conditionOne && conditionTwo || conditionThree && conditionFour || conditionFive;
+
+}
+//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator
+//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_additive_operator
+//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_string_concatenation
+//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_shift_operator
+//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_relational_operator
+//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator
+//--PREVIEW--END--org.eclipse.jdt.core.formatter.alignment_for_logical_operator
//--PREVIEW--START--org.eclipse.jdt.core.formatter.alignment_for_conditional_expression
class Example extends AnotherClass {int foo(boolean argument) {return argument ? 100000 : 200000;}}
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java
index 2a7a199..64122cf 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java
@@ -120,11 +120,12 @@
public static String FormatterModifyDialog_indentation_tree_indentation;
public static String FormatterModifyDialog_indentation_tree_indented_elements;
public static String FormatterModifyDialog_lineWrap_indentation_policy_label;
+ public static String FormatterModifyDialog_lineWrap_pref_additive_operators;
public static String FormatterModifyDialog_lineWrap_pref_annotations_arguments;
public static String FormatterModifyDialog_lineWrap_pref_arguments;
public static String FormatterModifyDialog_lineWrap_pref_array_init;
public static String FormatterModifyDialog_lineWrap_pref_assignments;
- public static String FormatterModifyDialog_lineWrap_pref_binary_exprs;
+ public static String FormatterModifyDialog_lineWrap_pref_bitwise_operators;
public static String FormatterModifyDialog_lineWrap_pref_catch;
public static String FormatterModifyDialog_lineWrap_pref_compact_if_else;
public static String FormatterModifyDialog_lineWrap_pref_compact_loops;
@@ -138,8 +139,10 @@
public static String FormatterModifyDialog_lineWrap_pref_extends_clause;
public static String FormatterModifyDialog_lineWrap_pref_for;
public static String FormatterModifyDialog_lineWrap_pref_implements_clause;
+ public static String FormatterModifyDialog_lineWrap_pref_logical_operators;
public static String FormatterModifyDialog_lineWrap_pref_max_line_width;
public static String FormatterModifyDialog_lineWrap_pref_module_statements;
+ public static String FormatterModifyDialog_lineWrap_pref_multiplicative_operators;
public static String FormatterModifyDialog_lineWrap_pref_never_join_lines;
public static String FormatterModifyDialog_lineWrap_pref_object_allocation_arguments;
public static String FormatterModifyDialog_lineWrap_pref_param_type_arguments;
@@ -148,11 +151,15 @@
public static String FormatterModifyDialog_lineWrap_pref_parameters;
public static String FormatterModifyDialog_lineWrap_pref_qualified_invocations;
public static String FormatterModifyDialog_lineWrap_pref_qualified_object_allocation_arguments;
+ public static String FormatterModifyDialog_lineWrap_pref_relational_operators;
+ public static String FormatterModifyDialog_lineWrap_pref_shift_operators;
+ public static String FormatterModifyDialog_lineWrap_pref_string_concatenation;
public static String FormatterModifyDialog_lineWrap_pref_superinterfaces;
public static String FormatterModifyDialog_lineWrap_pref_throws_clause;
public static String FormatterModifyDialog_lineWrap_pref_try;
public static String FormatterModifyDialog_lineWrap_pref_wrap_outer_expressions_when_nested;
public static String FormatterModifyDialog_lineWrap_tree_annotations;
+ public static String FormatterModifyDialog_lineWrap_tree_binary_expressions;
public static String FormatterModifyDialog_lineWrap_tree_class_decls;
public static String FormatterModifyDialog_lineWrap_tree_constructor_decls;
public static String FormatterModifyDialog_lineWrap_tree_enum_decls;
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties
index 61e15b4..3b8a63b 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties
@@ -189,6 +189,7 @@
FormatterModifyDialog_lineWrap_pref_constants=Constants
FormatterModifyDialog_lineWrap_pref_implements_clause='implements' clause
FormatterModifyDialog_lineWrap_pref_parameters=Parameters
+FormatterModifyDialog_lineWrap_pref_additive_operators=Additive operators (+, -)
FormatterModifyDialog_lineWrap_pref_arguments=Arguments
FormatterModifyDialog_lineWrap_pref_qualified_invocations=Qualified invocations
FormatterModifyDialog_lineWrap_pref_for='for'
@@ -199,7 +200,6 @@
FormatterModifyDialog_lineWrap_pref_array_init=Array initializers
FormatterModifyDialog_lineWrap_pref_explicit_constructor_invocations=Explicit constructor invocations
FormatterModifyDialog_lineWrap_pref_conditionals=Conditionals
-FormatterModifyDialog_lineWrap_pref_binary_exprs=Binary expressions
FormatterModifyDialog_lineWrap_pref_module_statements=Module statements
FormatterModifyDialog_lineWrap_val_indentation_default=Default indentation
FormatterModifyDialog_lineWrap_val_indentation_on_column=Indent on column
@@ -209,7 +209,7 @@
FormatterModifyDialog_lineWrap_tree_method_decls=Method Declarations
FormatterModifyDialog_lineWrap_tree_constructor_decls=Constructor declarations
FormatterModifyDialog_lineWrap_tree_function_calls=Function Calls
-FormatterModifyDialog_lineWrap_tree_expressions=Expressions
+FormatterModifyDialog_lineWrap_tree_expressions=Other expressions
FormatterModifyDialog_lineWrap_tree_statements=Statements
FormatterModifyDialog_lineWrap_tree_parameterized_types=Parameterized types
FormatterModifyDialog_lineWrap_tree_enum_decls='enum' declaration
@@ -226,17 +226,24 @@
FormatterModifyDialog_lineWrap_val_wrap_after_operators=Wrap after operators
FormatterModifyDialog_lineWrap_val_wrap_before_operators=Wrap before operators
FormatterModifyDialog_lineWrap_pref_max_line_width=Maximum line width:
+FormatterModifyDialog_lineWrap_pref_multiplicative_operators=Multiplicative operators (*, /, %)
FormatterModifyDialog_lineWrap_pref_default_indent_wrapped=Default indentation for wrapped lines:
FormatterModifyDialog_lineWrap_pref_default_indent_array=Default indentation for array initializers:
FormatterModifyDialog_lineWrap_pref_never_join_lines=Never join already wrapped lines
+FormatterModifyDialog_lineWrap_pref_shift_operators=Shift operators (<<, >>, >>>)
+FormatterModifyDialog_lineWrap_pref_string_concatenation=String concatenation
FormatterModifyDialog_lineWrap_pref_superinterfaces='implements' clause
FormatterModifyDialog_lineWrap_pref_assignments=Assignments
FormatterModifyDialog_lineWrap_tree_annotations=Annotations
+FormatterModifyDialog_lineWrap_tree_binary_expressions=Binary expressions
FormatterModifyDialog_lineWrap_pref_annotations_arguments=Element-value pairs
+FormatterModifyDialog_lineWrap_pref_bitwise_operators=Bitwise operators (&&, ^, |)
+FormatterModifyDialog_lineWrap_pref_logical_operators=Logical operators (&&&&, ||)
FormatterModifyDialog_lineWrap_pref_wrap_outer_expressions_when_nested=Prefer wrapping outer expressions (keep nested expression on one line)
FormatterModifyDialog_lineWrap_pref_param_type_ref=Type references
FormatterModifyDialog_lineWrap_pref_param_type_arguments=Type arguments
FormatterModifyDialog_lineWrap_pref_param_type_parameters=Type parameters
+FormatterModifyDialog_lineWrap_pref_relational_operators=Relational operators (<, >, <=, >=, ==, \!=)
FormatterModifyDialog_blankLines_tree_compilation_unit=Blank lines in compilation unit
FormatterModifyDialog_blankLines_pref_before_package=Before package declaration:
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java
index 84850eb..baf0a46 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java
@@ -1245,11 +1245,18 @@
.pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_explicit_constructor_invocations, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL)
.pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_object_allocation_arguments, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ALLOCATION_EXPRESSION)
.pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_qualified_object_allocation_arguments, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_QUALIFIED_ALLOCATION_EXPRESSION))
+ .node(fTree.builder(FormatterMessages.FormatterModifyDialog_lineWrap_tree_binary_expressions, "-binary-expressions", modAll) //$NON-NLS-1$
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_multiplicative_operators, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR)
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_additive_operators, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR)
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_string_concatenation, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION)
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_shift_operators, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SHIFT_OPERATOR)
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_relational_operators, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_RELATIONAL_OPERATOR)
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_bitwise_operators, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR)
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_logical_operators, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR))
.node(fTree.builder(FormatterMessages.FormatterModifyDialog_lineWrap_tree_expressions, null, modAll)
- .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_binary_exprs, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION)
.pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_conditionals, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION)
- .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_array_init, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER)
- .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_assignments, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ASSIGNMENT))
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_assignments, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ASSIGNMENT)
+ .pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_array_init, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER))
.node(fTree.builder(FormatterMessages.FormatterModifyDialog_lineWrap_tree_statements, null, modAll)
.pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_for, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_FOR_LOOP_HEADER)
.pref(FormatterMessages.FormatterModifyDialog_lineWrap_pref_compact_if_else, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_COMPACT_IF)
@@ -1268,8 +1275,26 @@
case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION:
wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_CONDITIONAL_OPERATOR;
break;
- case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION:
- wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR;
+ case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR:
+ wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR;
+ break;
+ case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR:
+ wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR;
+ break;
+ case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION:
+ wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_STRING_CONCATENATION;
+ break;
+ case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SHIFT_OPERATOR:
+ wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_SHIFT_OPERATOR;
+ break;
+ case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_RELATIONAL_OPERATOR:
+ wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_RELATIONAL_OPERATOR;
+ break;
+ case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR:
+ wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR;
+ break;
+ case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR:
+ wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_LOGICAL_OPERATOR;
break;
case DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_UNION_TYPE_IN_MULTICATCH:
wrapBeforeKey= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_OR_OPERATOR_MULTICATCH;
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileVersioner.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileVersioner.java
index a089b1d..4c5df9b 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileVersioner.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileVersioner.java
@@ -43,10 +43,10 @@
private static final int VERSION_12= 12; // https://bugs.eclipse.org/318010
private static final int VERSION_13= 13; // https://bugs.eclipse.org/514019
private static final int VERSION_14= 14; // https://bugs.eclipse.org/128653, https://bugs.eclipse.org/531826
-
private static final int VERSION_15= 15; // https://bugs.eclipse.org/205973
+ private static final int VERSION_16= 16; // https://bugs.eclipse.org/543080
- private static final int CURRENT_VERSION= VERSION_15;
+ private static final int CURRENT_VERSION= VERSION_16;
@Override
public int getFirstVersion() {
@@ -111,9 +111,12 @@
case VERSION_13 :
version13to14(oldSettings);
//$FALL-THROUGH$
- case VERSION_14:
- version14to15(oldSettings);
- //$FALL-THROUGH$
+ case VERSION_14:
+ version14to15(oldSettings);
+ //$FALL-THROUGH$
+ case VERSION_15:
+ version15to16(oldSettings);
+ //$FALL-THROUGH$
default:
for (final Iterator<String> iter= oldSettings.keySet().iterator(); iter.hasNext(); ) {
final String key= iter.next();
@@ -462,7 +465,7 @@
checkAndReplace(oldSettings,
FORMATTER_BINARY_EXPRESSION_ALIGNMENT,
- DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION);
+ FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION);
checkAndReplace(oldSettings,
FORMATTER_COMPACT_IF_ALIGNMENT,
@@ -657,6 +660,23 @@
}
}
+ private static void version15to16(Map<String, String> oldSettings) {
+ checkAndReplace(oldSettings, FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION, new String[] {
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR,
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR,
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION,
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR,
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR,
+ });
+ checkAndReplace(oldSettings, FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, new String[] {
+ DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR,
+ DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR,
+ DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_STRING_CONCATENATION,
+ DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR,
+ DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_LOGICAL_OPERATOR,
+ });
+ }
+
/* old format constant values */
private static final String FORMATTER_METHOD_DECLARATION_ARGUMENTS_ALIGNMENT = JavaCore.PLUGIN_ID + ".formatter.method_declaration_arguments_alignment"; //$NON-NLS-1$
@@ -848,4 +868,27 @@
*/
@Deprecated
private static final String FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION= DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION;
+
+ /**
+ * @deprecated As of 3.17 replaced by
+ * {@link DefaultCodeFormatterConstants#FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR},
+ * {@link DefaultCodeFormatterConstants#FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR},
+ * {@link DefaultCodeFormatterConstants#FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION},
+ * {@link DefaultCodeFormatterConstants#FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR},
+ * and
+ * {@link DefaultCodeFormatterConstants#FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR}
+ */
+ @Deprecated
+ private static final String FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION= DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION;
+
+ /**
+ * @deprecated As of 3.17 replaced by
+ * {@link DefaultCodeFormatterConstants#FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR},
+ * {@link DefaultCodeFormatterConstants#FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR},
+ * {@link DefaultCodeFormatterConstants#FORMATTER_WRAP_BEFORE_STRING_CONCATENATION},
+ * {@link DefaultCodeFormatterConstants#FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR}, and
+ * {@link DefaultCodeFormatterConstants#FORMATTER_WRAP_BEFORE_LOGICAL_OPERATOR}
+ */
+ @Deprecated
+ private static final String FORMATTER_WRAP_BEFORE_BINARY_OPERATOR= DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR;
}
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaStringAutoIndentStrategy.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaStringAutoIndentStrategy.java
index 4ed166f..9753729 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaStringAutoIndentStrategy.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaStringAutoIndentStrategy.java
@@ -228,7 +228,7 @@
private boolean isWrappingBeforeBinaryOperator() {
return DefaultCodeFormatterConstants.TRUE.equals(getCoreFormatterOption(
- DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR));
+ DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_STRING_CONCATENATION));
}
private int getContinuationIndentationSize() {
@@ -244,7 +244,7 @@
private int getBinaryOperatorAlignmentStyle() {
String binaryAlignmentValue= getCoreFormatterOption(
- DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION);
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION);
return DefaultCodeFormatterConstants.getIndentStyle(binaryAlignmentValue);
}