ProfK
ProfK

Reputation: 51064

How do remove template change message from the PHP Class template in NetBeans?

In NetBeans, when I add a new file using the PHP Class template, the new class contains the following comment:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

Yet this text doesn't appear anywhere in the template when I follow it's instructions to edit the template. How can I avoid having this comment included in all my new classes?

Upvotes: 4

Views: 4967

Answers (1)

Jonathan Spooner
Jonathan Spooner

Reputation: 7752

You need to remove <#include "../Licenses/license-${project.license}.txt"> from the top of the PHP class template. Don't forget to do this for Interface, File, and Web Page.

The text that you are trying to get rid of is part of the Default License so you could just change/remove the text there. The Default License is under the Licenses folder in the Template Manager.

Alternatively you could put a blank text file or license file in ~/.netbeans/7.0/config/Templates/Licenses/ and name the file license-foo.txt and then in your project.properties file define a key project.license and set it to foo. If you did this you would need to define the same key for each project or you would get the unwanted text again.

Edit: Actually to add a license you can just click the Add... button inside the Template Manager after selecting the Licenses folder.

Upvotes: 7

Related Questions