如何解决有没有办法让java eclipse格式化程序不对齐@param描述?
我正在尝试更改 Eclipse 格式化程序的设置,使其不与 param 标记描述的缩进对齐。
这就是我的目标:
/**
* Creates a new CTScanData object holding the data from the given file path.
*
* @param dataFilePath Path to the file containing the CT scan data.
* @param width Width of the scan data (left to right).
* @param depth Depth of the scan data (front to back).
* @param height Height of the scan data (top to bottom).
*/
这就是格式化程序当前正在做的事情:
/**
* Creates a new CTScanData object holding the data from the given file path.
*
* @param dataFilePath Path to the file containing the CT scan data.
* @param width Width of the scan data (left to right).
* @param depth Depth of the scan data (front to back).
* @param height Height of the scan data (top to bottom).
*/
我尝试更改了一些设置,但没有运气。
- 在 Eclipse 格式化程序编辑器中,我禁用了“@param 后缩进描述”和“缩进 Javadoc 标签”。
- 在导出的 XML 文件中,我发现
org.eclipse.jdt.core.formatter.comment.indent_parameter_description
设置为 false。我也尝试过实现这一点,但没有任何区别。
注意:我在 Visual Studio Code 中使用格式化程序,但我认为它与在 Eclipse 中使用它相比没有任何区别?每次更改后,我都会重新启动 Visual Studio Code 以确保应用了更改。
解决方法
请确保您在 .settings/org.eclipse.jdt.core.prefs
中有以下内容:
org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。