This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans should allow users to edit the templates which provide generated code. For instance, if I'm attempting to invoke a method which doesn't exist, NetBeans provides me with a hint to create the nonexistent method. I would like for this code to have something like... //TODO: implement this method ...in it so it shows up in my Task List as well. Currently there is no way for me to automate this addition. Some people might want to throw a org.apache.commons.lang.NotImplementedException instead of a java.lang.UnsupportedOperationException in this generated method. Allowing users to customize the method as a code template would allow this flexibility. This feature would also resolve Issue #111441.
Yes, that would be certainly nice to have.
*** Issue 7861 has been marked as a duplicate of this issue. ***
*** Issue 155481 has been marked as a duplicate of this issue. ***
Definitely a needed feature. Other things can then take advantage of it. There are multiple places this would be useful.
I'd like to be able to change the logger invocation on generated catch() statements. If there is concern about what "abbreviation" names to use etc, it might make sense to keep these separated from the existing code templates which the user types abbreviations to activate. But, they should be editable somewhere.
The existing code templates in NetBeans (for both macros and new files) use FreeMarker, right? Will this mean that all existing hints will need to be rewritten using FreeMarker instead of the JavaC API?
Fixed in 7.3 - the generated method bodies can be customized. See http://wiki.netbeans.org/NetBeans_73_NewAndNoteworthy#Customizable_Method_Bodies