Jalopy comments indentation
We开发者_StackOverflow中文版 use jalopy to format our code to the sun standard (well 99%).
I have 1 issue with it. It keeps moving comments to the right of the line.
E.g
// Panel
"JPanel.border", new LazyValue(packageName + "PanelBorder"), //frozen
// Button
"Button.background", new ColorUIResource(251, 251, 251), //frozen
"Button.foreground", new ColorUIResource(0, 0, 0), //frozen
But jalopy always moves the // Button to the far right.
// Panel
"JPanel.border", new LazyValue(packageName + "PanelBorder"), //frozen
// Button
"Button.background", new ColorUIResource(251, 251, 251), //frozen
"Button.foreground", new ColorUIResource(0, 0, 0), //frozen
Is there any way to stop this?
Thanks Neil
so we use jaloppy 1.9.2 (commercial version) and single-line comments are formatted correctly
This is due to comment association. You have //frozen
followed by an empty line and then //Button
. Jalopy thinks that these two comments are associated with each other, so brings them together.
Take a look at Section 2.8.13.2 Comment association of the manual for more information.
精彩评论