java – 如何在Netbeans 7.1.2中设置${user}的值?

前端之家收集整理的这篇文章主要介绍了java – 如何在Netbeans 7.1.2中设置${user}的值?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想在Netbeans中替换${user}的默认值.帮助文件

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.

在步骤2中,双击“属性”不执行任何操作.我尝试在编辑器中打开“属性”模板并添加用户属性.我还尝试将基于Properties模板的文件添加到项目中.在创建新文件时,这些都没有改变输出.

我如何在Netbeans 7.1.2中执行此操作?

解决方法

当我撰写这个问题时,我找到了解决方案,并希望将其发布在此处供其他人参考. Netbeans帮助文件中的说明不正确.第2步应更改如下:
  1. Expand the Other category. Click the Setting button. The User.properties file opens in the editor.

我希望这对将来的某个人有用.

猜你在找的Java相关文章