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.
As part of bug #206954 I am writing an editor hint which creates a @NavigatorPanel.Registration and adds it to a class implementing NavigatorPanel. I create a new ModifiersTree with the annotation, whose toString is e.g. @org.netbeans.spi.navigator.NavigatorPanel.Registration(mimeType = "image/png") and call WorkingCopy.rewrite. But the result is e.g. ... import org.netbeans.spi.navigator.NavigatorPanel; ... @Registration(mimeType = "image/png") public class ImageNavigatorPanel implements NavigatorPanel {...} which does not compile until you add the "NavigatorPanel." prefix or Fix Imports to import the nested type. This happens whether or not I call GeneratorUtilities.importFQNs. I suspect that the problem is that the annotation is a member of the annotated element's supertype. But of course the annotation would only become in scope as a result of this if it were inside the class body.
Integrated into 'main-golden', will be available in build *201201070601* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a5bd98efcecc User: Jan Lahoda <jlahoda@netbeans.org> Log: #206957: elements visible through extends/implements are visible only inside class body
And also: http://hg.netbeans.org/main/rev/6f289938ea71
*** Bug 208333 has been marked as a duplicate of this bug. ***
Product Version: NetBeans IDE Dev (Build 201208190001) Java: 1.7.0_06; Java HotSpot(TM) Client VM 23.2-b09 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb) Verified.