0

I am trying to add ${user} to my code templates but its only outputting 'user' Is there a way to set this? Or any suggestions? Ideally I would like to add date and project name as well? I know I can add the ${user} to file templates but it doesn't work in code templates

This is a similar issue NetBeans Code Templates ${date}?

Community
  • 1
  • 1

1 Answers1

1

You just hace to use the default attribute:

Lets say you crate a new template named license with the following content:

/*
* All rights reserved.
* Created by ${user default="Keni-Williams"}.
*/

Then everytime you write license and press tab will appear

/*
* All rights reserved.
* Created by Keni-Williams
*/

With the Keny Williams selected in case you want to change it.

Ruslan López
  • 4,433
  • 2
  • 26
  • 37