Block comments not being reformatted/realigned on changes?

Whenever I add curly brackets around a section of code, or remove them, or paste a block of code from the clipboard. I've noticed the block comments are not being realigned with the code. The block comments retain their indents whereas the code is reindented. This is only block comments, inline comments are realigned correctly.

Seem to be spending a lot of time manually correcting the indents of modified block comments.

Any idea what code style setting this might be. I've only really noticed it the past few weeks, feels like something changed fairly recently (currently using 14.1.4).

3 comments
Comment actions Permalink

Does it happen in Java code? Please provide a file to reproduce.

0
Comment actions Permalink

Yes any Java files. e.g.

package sample; public class Sample {          /*      * Simple method description      */     public abstract String sampleMethod2 ();     // Simple method description     public abstract String sampleMethod3(); }


If I select the block comment and code (lines 5-8) copy, then at the bottom of the class. Hit return at end of sampleMethod3(); (so I get a newline) then paste I get:

package sample; public class Sample {          /*      * Simple method description      */     public abstract String sampleMethod2 ();     // Simple method description     public abstract String sampleMethod3();     /* * Simple method description */     public abstract String sampleMethod2(); }


If instead I was to manually insert a block around lines 5-8 by adding curly braces I get this instead (note the block comment doesn't move, unlike the code):

package sample; public class Sample {          {     /*      * Simple method description      */         public abstract String sampleMethod2 ();     }
    // Simple method description     public abstract String sampleMethod3(); }


Seems removing this block (by removing the curly braces again) doesn't cause a similar reformat. Not for blocks, single line comments nor code. Can't remember if it ever did.


Somwhat contrived examples but these kinds of things.

0

Please sign in to leave a comment.