StokeBloke.com

Netbeans log code template

Tuesday, May 3rd, 2011

For some years I have been adding this code template to Netbeans.

private static final Logger log = Logger.getLogger(${classVar editable="false" currClassName default="getClass()"}.class.getName());

You can add this by going to Netbeans->Tools Menu->Options->Editor->Code Templates dialog.

Netbeans Code Templates

Edit @ 29/08/2011
In newer Netbeans you must ensure that the “On Template Expansion:” is set to “Reformat text” else it gets extra new lines added in the code template.

${no-format}private static final Logger log = Logger.getLogger(${classVar editable="false" currClassName default="getClass()"}.class.getName());

UML tool in Netbeans is very slow

Thursday, April 10th, 2008

Well I finally decided to document some of the java classes in Model Manager.

I failed.

It appears Netbeans has a performance issue as the UML projects get larger the responsiveness of netbeans gets worse.

I had to submit this bug against Netbeans.

For some reason each click in Netbeans triggers a scanning of the XML document. As this document gets larger the scanning gets slower. Never mind the fact it only uses 1 of my 4 cores.

I looked into the actual UML project and the etd file is over 32 Mb. No wonder it takes a while to scan.

Edit: the issue has been fixed in Netbeans 6.1 beta version.