Abhishek Pathak
Abhishek Pathak

Reputation: 107

How to disable auto comment in Netbeans 7.4

I do not want these comments when I create a new main class.

// TODO code application logic here 
/** 
* @param args the command line arguments 
*/ 

/** 
* 
* @author user 
*/ 

etc.

Upvotes: 7

Views: 16474

Answers (3)

enLighter Programmer
enLighter Programmer

Reputation: 413

in Tools->Templates->Java-> (edit template for both java Class and Java main Class) to the following:

<#if package?? && package != "">
package ${package};
</#if>

public class ${name} {

    public static void main(String[] args) {

    }
}

Upvotes: 1

vitfo
vitfo

Reputation: 10291

If you are unhappy with autogenerated comments in Java Class:

  • Tools -> Templates -> Java -> Java Class -> Open in Editor -> delete what you do not like and save

You can leave just this:

<#if package?? && package != "">
package ${package};

</#if>
public class ${name} {

}

Upvotes: 18

Jean Waghetti
Jean Waghetti

Reputation: 4727

The place to configure it is Tools -> Templates.

Take a look at Licenses/Default License. If your project does not have an license, this is what will be on the begin of the file.

Upvotes: 1

Related Questions