tra*_*ega 4 intellij-idea live-templates auto-generate
如何在IntelliJ中的实时模板中自动生成任意数字(长整数)?
例:
public static final long uid = $randomLong$;
Run Code Online (Sandbox Code Playgroud)
其中randomLong替换为随机长值.我尝试将以下内容添加为实时模板定义中变量的表达式,但模板输出时不会生成任何内容.
new Random().nextLong()
Run Code Online (Sandbox Code Playgroud)
我想要实现的非常类似于IDEA代码检查器为序列化版本UID字段生成但具有实时模板的内容.
| 归档时间: |
|
| 查看次数: |
778 次 |
| 最近记录: |