【发布时间】:2020-06-19 00:32:17
【问题描述】:
这是我要移植的 Eclipse 模板:
${:import(org.apache.log4j.Logger)}
private static final Logger LOG = Logger.getLogger(${enclosing_type}.class);
我目前在IDEA中的版本如下:
private static final Logger LOG = Logger.getLogger($CLASS_NAME$.class);$END$
其中$CLASS_NAME$ 配置为使用className() 作为其表达式。
不幸的是,我没有找到任何关于添加导入语句的文档。有没有相当于 Eclipse ${:import(...)} 的东西?
【问题讨论】:
标签: intellij-idea code-templates