How to remove a template change message from a 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. */ 

However, this text does not appear anywhere in the template when I follow the instructions for editing the template. How can I avoid including this comment in all my new classes?

+4
source share
1 answer

You need to remove <#include "../Licenses/license-${project.license}.txt"> from the top of the PHP class template. Remember to do this for the interface, file, and web page.

The text you are trying to get rid of is part of the default License , so you can simply change or delete the text there. The default license is located in the Licenses folder in the template manager.

Alternatively, you can put an empty text or license file in ~/.netbeans/7.0/config/Templates/Licenses/ and name the file license-foo.txt , and then in the project.properties file define the project.license key and set it on foo . If you have done this, you will need to define the same key for each project, otherwise you will again receive unwanted text.

Edit: In fact, to add a license, you can simply click the "Add ..." button inside the Template Manager after selecting the "Licenses" folder.

+6
source

Source: https://habr.com/ru/post/1383166/


All Articles