Eclipse Custom Variable for Java Code Templates

前端 未结 7 1087
予麋鹿
予麋鹿 2020-12-30 09:38

How do you add a new variable to be inserted into a Java code template. How do I add a variable to the list in Window->Preferences->Java->Code Style->Code Templates->Code->N

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 10:00

    I'm pretty sure that the list of "variables" is generated by Eclipse and there is no way to add a new template variable.

    What do you want ${begin_filecomment} and ${end_filecomment} to be? Just type the content into the Edit box - there is nothing that says you cannot put static content in there.

提交回复
热议问题