Fix wrapped line formatting 16/84716/1
authormark.j.leonard <mark.j.leonard@gmail.com>
Tue, 9 Apr 2019 15:53:15 +0000 (16:53 +0100)
committermark.j.leonard <mark.j.leonard@gmail.com>
Tue, 9 Apr 2019 15:59:28 +0000 (16:59 +0100)
Update the setting "Default indentation for wrapped lines" to be 2 units
of indentation (as per the standard Google style guide formatter).
This causes a continued line to be indented differently to the following
code block and distinguishes a wrapped line from a non-wrapped line.

Also update the array initializer indentation to match, so that array
values are horizontally aligned with other initializers such as List
contructors and also with standard expressions.

Both settings are now identical with the Google-supplied formatter.

Change-Id: I05dd2b3ff522c75bb6aaf2c03017874d42e215c7
Issue-ID: AAI-2198
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
onap-java-formatter.xml

index 368ede1..459179e 100644 (file)
@@ -72,8 +72,8 @@
 <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
 <setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
 <setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
 <setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
 <setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
 <setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>