Intellij file template: how to set file name dynamically

Viewed 52

I'm making a intellij template MyClassController but I want to insert just MyClass as name because I need to create thousands with same pattern.

I tried

package ...
#set($BASENAME = $NAME)
#set($NAME=${BASENAME} + "Controller")
#set($OBJNAME = $BASENAME.substring(0, 1).toLowerCase() + $BASENAME.substring(1))
import ...

but if #set($NAME= ... ) is present filename popup is not showing. BASENAME's value (that is "") became NAME's value so my file end being named "$BASENAME" or "$".

There's a way to force name popup to appear or rename file after file is generated?

0 Answers
Related