File template with $ dollar signs
I'd like to include a Subversion $Id$ keyword in my class file template but when I try the following the //$Id$ gets changed to //$ for new classes.
//$Id$
#if ($ != "")package $;#end
#parse("File Header.java")
public class $ {
}
>>> ends up as
//$
package ......
Maybe it's trying to treat this as a predefined variable...
Any ideas how to get around this?
请先登录再写评论。
IIRC, IDEA uses Velocity for templates like this. But anyway, you can use the '\' as escape for the 'variable alike' $Id$ construction :
//\$Id$
would end up as
//$Id$