With the release of Java Source API with NetBeans 6.1Beta I finally got the chance to write such a tool for myself :). In sequence with my toString() generator module I started this module as well. You can download the NBM file and install it as it is free and open source. How-to of this tool is as follows.
Basically what I needed for it can be stated in 3 steps -
- Parse/read the Java File
- Find declared classes
- Check if Logger exists if not create it and add utility methods.