7

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 'user=LorumIpsum@mycompany.com'. When a code template is expanded, all occurrences of ${user} in that template are replaced with 'LorumIpsum@mycompany.com'.

  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?

Community
  • 1
  • 1
Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268

1 Answers1

11

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.

Community
  • 1
  • 1
Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268