Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the value of ${user} in Netbeans 7.1.2?

I would like to replace the default value of ${user} in Netbeans. The help file says

To define a parameter:

  1. In the IDE's menu bar, choose Tools > Templates. The Template Manager opens.

  2. Expand the Other category. Double-click on Properties. The User.properties file opens in the editor.

  3. Define a parameter. For example, define the ${user} parameter for adding your name to templates you create. The syntax is '[email protected]'. When a code template is expanded, all occurrences of ${user} in that template are replaced with '[email protected]'.

  4. Add as many additional parameters as you want, with the syntax name=value.

On Step 2, double-clicking on Properties does nothing. I tried opening the Properties template in the editor and adding a 'user' property. I also tried adding a file, based on the Properties template, to a project. Neither of these changed the output when I created a new file.

How do I do this in Netbeans 7.1.2?

like image 418
Code-Apprentice Avatar asked Jul 27 '12 22:07

Code-Apprentice


1 Answers

As I composed this question, I found the solution and want to post it here for others to reference. The instructions in the Netbeans helpfile is incorrect. Step 2 should be changed as follows:

  1. ...

  2. Expand the Other category. Click the Setting button. The User.properties file opens in the editor.

I hope this is useful to someone in the future.

like image 80
Code-Apprentice Avatar answered Sep 18 '22 22:09

Code-Apprentice