Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit getter & setter templates in NetBeans?

By default NetBeans generates 3 line getters and setters like so:

public int getFoo() {
    return foo;
}

Is there a way to make it generate it in one line like so:

public int getFoo() {return foo;}

I did not find any get or set templates in Tools -> Options -> Editor -> Code Templates

Is there some other way to edit them or maybe a plugin?

like image 572
Kristaps Baumanis Avatar asked May 17 '12 13:05

Kristaps Baumanis


1 Answers

As seem you can't really, but I've found a patch in this blog post which modifies Netbeans source.

like image 185
Nux Avatar answered Oct 11 '22 06:10

Nux