default values for file template variables in phpStorm

Hi,

 

is it possible to assign a default value to custom variables in file templates but have the input prompt for it in the form?

 

thanks in advance,

have a nice day 

 

Joachim Thomas

3 comments

Hello,

What would be a use case of that? Could you describe it please?

0

a possible example:

#set ( $CLASSNAME = ${NAME.substring(4,5).toUpperCase()} + ${NAME.substring(5)} )
#set ( $MYPROJECT = ${PROJECT_NAME.toLowerCase()} )

============= HERE =====================
#set[default?] ($myBaseClass = 'BaseObject')

=====================================

<?php

/**
*
* @package baseObjects
* @version ${DS}Id: 1.0.0 ${DAY}.${MONTH}.${YEAR} ${MYPROJECT}$
* @author Joachim Thomas <jthomas@lightelements.com>
* @copyright ${YEAR} Joachim Thomas - lightelements software
*
* ${DAY}.${MONTH}.${YEAR} 1.0.0 ${MYPROJECT}
*
*/

class iobj${CLASSNAME} extends ${myBaseClass} {

 

0

Please sign in to leave a comment.