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.
Product Version = NetBeans IDE Dev (Build 201011150001) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.6.0_22 Runtime = Java HotSpot(TM) Client VM 17.1-b03 I wrote a small bit of code and purposely left-out the declaration of a variable so I could use the hint to fill in the type of the variable for me. The code is of the form xx = someFunction(); where xx is not a declared variable. The following hints are offered: Create field xx in aa.bb.cc Create parameter xx Create local variable xx When I select any of these options nothing happens. messages.log shows: INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=the.correct.fully.qualified.classname.Here ] INFO [org.netbeans.modules.java.hints]: Cannot resolve proposed type. Where "the.correct.fully.qualified.classname.Here" is the name of the correct class to use, that is it is the return type of "someFunction()" from my example above. It turns out that the library containing that class was not listed in the libraries for this project. So I added it by selecting "Add Project..." from the context menu of the project Libraries and everything worked.. but there should have been better feedback in the UI. E.g. an error message stating that the class in question was not on the class path for this project.
IIRC there were fixes recently since this report to make handles for unresolvable type work. I tried to reproduce in a recent daily build, and it creates the variable (a simple name of the unresolvable type is used as the type of the variable).