-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: formatter indentation change #1933
base: main
Are you sure you want to change the base?
Conversation
This eliminates many cases of extreme indentation Fixes jbangdev#1902
@@ -207,7 +207,7 @@ | |||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/> | |||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/> | |||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/> | |||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="82"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if you just remove this line (and use default value)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, this is what Eclipse exported for me when I changed the option to the default.
Are you expecting some other behaviour?
So I tried the option that uses just a single indent when continuing a chain of method calls and it goes from this original format: public void downloadSources(Artifact artifact) {
try {
context .repositorySystem()
.resolveArtifact(context.repositorySystemSession(), new ArtifactRequest()
.setArtifact(
new SubArtifact(
artifact,
"sources",
"jar"))
.setRepositories(
context.remoteRepositories()));
} catch (ArtifactResolutionException e) {
Util.verboseMsg("Could not resolve sources for " + artifact.toString());
}
} to this new format: public void downloadSources(Artifact artifact) {
try {
context.repositorySystem()
.resolveArtifact(context.repositorySystemSession(), new ArtifactRequest()
.setArtifact(new SubArtifact(artifact, "sources", "jar"))
.setRepositories(context.remoteRepositories()));
} catch (ArtifactResolutionException e) {
Util.verboseMsg("Could not resolve sources for " + artifact.toString());
}
} Which I personally find much neater. |
I like the last one as well! |
No description provided.