diff options
Diffstat (limited to 'org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java')
-rw-r--r-- | org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java index 2c8705a227..5f416ea7c5 100644 --- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java +++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java @@ -143,6 +143,7 @@ public class DefaultCodeFormatterOptions { public int alignment_for_union_type_in_multicatch; public boolean align_type_members_on_columns; + public boolean align_with_spaces; public int align_fields_grouping_blank_lines; public String brace_position_for_annotation_type_declaration; @@ -485,6 +486,7 @@ public class DefaultCodeFormatterOptions { options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_UNION_TYPE_IN_MULTICATCH, getAlignment(this.alignment_for_union_type_in_multicatch)); options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS, this.align_type_members_on_columns ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE); options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGN_FIELDS_GROUPING_BLANK_LINES, Integer.toString(this.align_fields_grouping_blank_lines)); + options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGN_WITH_SPACES, this.align_with_spaces ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE); options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ANNOTATION_TYPE_DECLARATION, this.brace_position_for_annotation_type_declaration); options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION, this.brace_position_for_anonymous_type_declaration); options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ARRAY_INITIALIZER, this.brace_position_for_array_initializer); @@ -1055,6 +1057,10 @@ public class DefaultCodeFormatterOptions { this.align_fields_grouping_blank_lines = Integer.MAX_VALUE; } } + final Object alignWithSpaces = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGN_WITH_SPACES); + if (alignWithSpaces != null) { + this.align_with_spaces = DefaultCodeFormatterConstants.TRUE.equals(alignWithSpaces); + } final Object bracePositionForAnnotationTypeDeclarationOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ANNOTATION_TYPE_DECLARATION); if (bracePositionForAnnotationTypeDeclarationOption != null) { try { @@ -2489,6 +2495,7 @@ public class DefaultCodeFormatterOptions { this.alignment_for_type_parameters = Alignment.M_NO_ALIGNMENT; this.alignment_for_union_type_in_multicatch = Alignment.M_COMPACT_SPLIT; this.align_type_members_on_columns = false; + this.align_with_spaces = false; this.align_fields_grouping_blank_lines = Integer.MAX_VALUE; this.brace_position_for_annotation_type_declaration = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_anonymous_type_declaration = DefaultCodeFormatterConstants.END_OF_LINE; @@ -2806,6 +2813,7 @@ public class DefaultCodeFormatterOptions { this.alignment_for_type_parameters = Alignment.M_NO_ALIGNMENT; this.alignment_for_union_type_in_multicatch = Alignment.M_COMPACT_SPLIT; this.align_type_members_on_columns = false; + this.align_with_spaces = false; this.align_fields_grouping_blank_lines = Integer.MAX_VALUE; this.brace_position_for_annotation_type_declaration = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_anonymous_type_declaration = DefaultCodeFormatterConstants.END_OF_LINE; |