intellij-idea - 当列中有一些注释时对齐列中的字段
问题描述
如果列中有注释,请尝试弄清楚如何对齐列中的字段。没有注释它工作得很好。
我想在执行代码重新格式化时实现以下视图:
@Null
private UUID id;
@NotNull
private UUID otherId;
@NotNull(groups = ...)
private String title;
但是当我们使用带注释的字段时,启用“组声明->在列中对齐字段”的代码重新格式化似乎无法确定这样的组声明,因此收到以下视图:
@Null
private UUID id;
@NotNull
private UUID otherId;
@NotNull(groups = ...)
private String title;
有人知道如何解决吗?
解决方案
IntelliJ 格式化程序中没有选项可以实现这一点,但 Eclipse Code Formatter 插件可以完成这项工作。
https://plugins.jetbrains.com/plugin/6546-eclipse-code-formatter
推荐阅读
- substrate - 如何转换 Vec
在基板运行时到 &str 或 String - java - ScheduledExecutorService 可以提前吗?
- asp.net-core - 带有 Jaro-Winkler 相似距离算法的 EF Core
- baseline - 我在安装基线协议时遇到问题
- r - 如何将 between 函数与 case_when 函数一起使用?
- python - 使用 Python 计算多个峰下的面积
- javascript - 如何单击 Selenium 中的弹出窗口?
- load-balancing - MaxScale 集群(主-主)设置
- python - 如何使函数的单个参数采用多个不同的可接受的字符串值?
- django - 有没有办法强制 django 在检查其他应用程序之前检查当前应用程序中的静态文件