Closed hmkrivoj closed 3 months ago
Beispielcode
public enum SomeEnum { LONGLONGLONGLONGONE(1111111111111111111L, 1111111111111111111L, 1111111111111111111L, 1111111111111111111L), LONGLONGLONGLONGTWO(1111111111111111111L, 1111111111111111111L, 1111111111111111111L, 1111111111111111111L), LONGLONGLONGLONGTHREE(1111111111111111111L, 1111111111111111111L, 1111111111111111111L, 1111111111111111111L), LONGLONGLONGLONGFOUR(1111111111111111111L, 1111111111111111111L, 1111111111111111111L, 1111111111111111111L); private long one; private long two; private long three; private long four; SomeEnum(long one, long two, long three, long four) { this.one = one; this.two = two; this.three = three; this.four = four; } }
Mit den jetzigen Einstellungen werden die Enum-Konstanten sehr unschön gewrappt:
Ich würde deshalb für org.eclipse.jdt.core.formatter.alignment_for_enum_constants folgende Einstellungen wählen:
org.eclipse.jdt.core.formatter.alignment_for_enum_constants
forceSplit
true
wrapStyle
WRAP_ONE_PER_LINE
Für org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant würde ich wrapStyle ebenfalls auf WRAP_ONE_PER_LINE setzen
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant
public enum SomeEnum { LONGLONGLONGLONGONE(1111111111111111111L, 1111111111111111111L, 1111111111111111111L, 1111111111111111111L), LONGLONGLONGLONGTWO( 1111111111111111111L, 1111111111111111111L, 1111111111111111111L, 1111111111111111111L), LONGLONGLONGLONGTHREE( 1111111111111111111L, 1111111111111111111L, 1111111111111111111L, 1111111111111111111L), LONGLONGLONGLONGFOUR(1111111111111111111L, 1111111111111111111L, 1111111111111111111L, 1111111111111111111L); private long one; private long two; private long three; private long four; SomeEnum(long one, long two, long three, long four) { this.one = one; this.two = two; this.three = three; this.four = four; } }
Beispielcode
Mit den jetzigen Einstellungen werden die Enum-Konstanten sehr unschön gewrappt:
Ich würde deshalb für
org.eclipse.jdt.core.formatter.alignment_for_enum_constants
folgende Einstellungen wählen:forceSplit
:true
wrapStyle
:WRAP_ONE_PER_LINE
Für
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant
würde ichwrapStyle
ebenfalls aufWRAP_ONE_PER_LINE
setzen