Skip to content

Commit

Permalink
Indent multiline method invocations consistently with Java 8 and 11
Browse files Browse the repository at this point in the history
Closes gh-332
  • Loading branch information
wilkinsona committed May 25, 2022
1 parent 3f9307a commit 3741699
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eclipse/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package simple;

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Simple {

public String someMethod() throws MalformedURLException, IOException {
String settingsXml = new String(Files.readAllBytes(Paths.get("src", "intTest", "projects", "settings.xml")),
StandardCharsets.UTF_8)
.replace("@localCentralUrl@",
new File("build/int-test-maven-repository").toURI().toURL().toString())
.replace("@localRepositoryPath@", new File("build/local-maven-repository").getAbsolutePath());
return settingsXml;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package simple;

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Simple {

public String someMethod() throws MalformedURLException, IOException {
String settingsXml = new String(Files.readAllBytes(Paths.get("src", "intTest", "projects", "settings.xml")),
StandardCharsets.UTF_8)
.replace("@localCentralUrl@",
new File("build/int-test-maven-repository").toURI().toURL().toString())
.replace("@localRepositoryPath@", new File("build/local-maven-repository").getAbsolutePath());
return settingsXml;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ core.formatter.alignment_for_throws_clause_in_method_declaration=16
core.formatter.alignment_for_type_arguments=0
core.formatter.alignment_for_type_parameters=0
core.formatter.alignment_for_union_type_in_multicatch=16
core.formatter.align_selector_in_method_invocation_on_expression_first_line=false
core.formatter.blank_lines_after_imports=1
core.formatter.blank_lines_after_package=1
core.formatter.blank_lines_before_field=0
Expand Down

0 comments on commit 3741699

Please sign in to comment.