Jalopy 注释缩进
我们使用 jalopy 将代码格式化为 sun 标准(99%)。
我有 1 个问题。它不断地将注释移动到该行的右侧。
例如,
// 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
但是老爷车总是将//按钮移到最右边。
// 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
有什么办法可以阻止这种情况吗?
谢谢 尼尔
We 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
所以我们使用jaloppy 1.9.2(商业版)并且单行注释格式正确
so we use jaloppy 1.9.2 (commercial version) and single-line comments are formatted correctly
这是由于评论关联。您有
//frozen
,后跟一个空行,然后是//Button
。 Jalopy 认为这两个评论是相互关联的,因此将它们放在一起。请参阅手册的第 2.8.13.2 条评论关联了解更多信息信息。
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.