Questions about "File template"

There is option in settings called "File template", where you can define your own template. You can pass different variables to template, which replaced by IDE (like ${name}).

Questions:

- When you define variables ${test}, IDE ask enter it, is there is way to avoid it?


- Is there is way to add something to file name when it is created? So insted of just ${name}.php, new file will be named as ${name}Controller.php ?

- Is there is way to "work" with variables, for example use substing function? Like that: $(tes) = Test_Test1 $(test2) = OPERATIONS ($(test)), and it now must equal to 'Test1'.
1 comment

Sorry for delay, looks like the notification got lost somehow.
- you can escape \$ to avoid var prompting
- currently there's no option for changing file name from template - you are prompted for name directly on template invocation. We plan to add facilities for framework support and this type of features will be implemented during that stage. Fill free to file a request to http://youtrack.jetbrains.net/issues/WI to track progress
- as pointed in IDE documentation templates use Velocity engine, see http://velocity.apache.org/engine/devel/vtl-reference-guide.html

0

Please sign in to leave a comment.