Incorrect Java Indentations in IDEA 15.0.1

I've recently switched to 15.0.1 and have found that some of the Java indentations are incorrect, or at least don't match that of prior versions.

I have the Java code style set to use a tab character as indentation with tab size, indent, and continuation indent all set to 1.

There are at least two areas I've noticed unexpected behavior.  When first creating a Javadoc, an indentation is used before each line's asterisk when I'd like a space there instead.  Also, when I attempt to put method arguments or chained method calls on newlines, it uses two indentations when I'd prefer it only use one.  The attached incorrect indentation image shows these issues as they are now with the current settings, and the desired indentation image shows how they should appear.

Are these problems with IDEA and indentations, or are there some style or other settings that I can change to get the desired behavior?  These didn't seem to be issues in 14 (though in 14 I did noticed that altering Javadocs sometimes added an indentation right before the asterisk, which didn't seem correct).  I tend to use them often, so I'd prefer to have them automatically handled rather than manually editing them to look correct.



Attachment(s):
DesiredIndentation.png
IncorrectIndentation.png
4 comments
Comment actions Permalink

Did you check what is used inside the saved file, spaces or tabs? https://youtrack.jetbrains.com/issue/IDEA-147794 could be related.

0
Comment actions Permalink

The saved file looks the same as in the attached images, with tabs.

That issue does seem somewhat similar, but it's marked as a feature, and what I've encountered seems more like a bug as it's an inconsistency between versions as well as the Java code style settings.

0
Comment actions Permalink

Could you please submit a new bug at http://youtrack.jetbrains.com/issues/IDEA with your code style and a sample file to reproduce? You can make a project with just one file and your code style stored inside the project.

0
Comment actions Permalink

I've created the issue IDEA-148987 with related information attached.  Thanks for the assistance.

0

Please sign in to leave a comment.