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.
Tim Boudreau wrote: > stat - StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(getClass(), "KEY")) - where KEY is a parameter This is a well-known antipattern; such code will break if called from a subclass in a different package! Please fix the abbreviation to use TheTopLevelContainingClass.class instead.
Same for the Logger-related abbreviations. Better to delete these abbreviations until they can be done correctly, than have people start creating bugs that may not be caught for years.
See bug 164597 - there is currently no way to get a hint for the current class name in a code template. I will probably try to develop a patch to enable this in the next day or so, since I don't think it will be touched otherwise.
Fixed in main/ 9ab6fe4a3c92 along with patch to java.editor to enable referencing containing class from code templates
Integrated into 'main-golden', will be available in build *201001240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/9ab6fe4a3c92 User: Tim Boudreau <tboudreau@netbeans.org> Log: #164597 and #179805 - ability to reference containing class in code templates, fix apisupport.project code templates (NbBundle, Logger) not to use getClass().