我有代码样式模板,它定义了带有新 Java 类注释的默认注释(见下文)。
如何让它插入来自 Maven 的版本pom.xml
?就像是
@since ${pom.project.version}
CodeStyle_codetemplates.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Code Style Code Template
To start using open Window -> Preferences
Java \ Code Style \ Code Template
Press [Import...] button and select this file.
-->
<templates>
<template autoinsert="false" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">${filecomment}
${package_declaration}
/**
*
* @since ${date}
* @author ${user}
* Reviewer
*/
${typecomment}
${type_declaration}</template></templates>