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.

#if ($ != "")package $;#end
public class $ {

>>> ends up as
package ......

Maybe it's trying to treat this as a predefined variable...
Any ideas how to get around this?

1 comment
Comment actions Permalink

IIRC, IDEA uses Velocity for templates like this. But anyway, you can use the '\' as escape for the 'variable alike' $Id$ construction :


would end up as



Please sign in to leave a comment.