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.
With the latest version of netbeans (I think it started with 6.1), I've stumbled many issues with the fix import feature. -A simple one is that fix import does not work (all the time). I have difficulty finding the exact cause of the error, but for example, this morning, I create a new (empty) class in an existing package x.y.z. I declare a variable from package x.a.b and try to fix the import automatically but nothing is imported and I get a message telling me there is nothing to fix (but there is). I can add the import manually, however, and then the class compiles correctly. -Another issue I've had is when it does work, it misses some classes. It will fix some of the imports, but not all of them. -Yet another issue i've had is that sometimes, it generates invalid import code. There will be partial import statements that cause the entire class to become invalid. But I've never been able to reproduce the exact steps that lead to it. Could be a race condifition fired when multiple fix import commands are fired at the same time. One thing I've noticed is that all the imports that do not work belong in my project. Standard java classes are always imported properly. Moreover, I notice that when I get the Fix All Imports dialog open in a class that contains 'working' and 'non working' imports, the non working imports have an error message in place of the drop down: 'cannot be resolved'. I find that this significantly affects my netbeans experience. Enough to revert to an older version, hence why I've put this as P2.
Can you please try patch from issue 128326?
-the latest nightly trunk (200805280004) appears to work properly in regards to the imports. I could not reproduce any of the issues below. I did a 'clean and build' on the project before trying to reproduce the bugs. -using the 'official' version I am using, fully updated through 'check for updates', I cannot reproduce these issues in my project. The issues happened last night however. I tried the latest nightly first. Hope this helps.
Thanks for info, the fix from issue 128326 is in trunk build only. We are going to integrate it also in 6.1 as patch 2. Meanwhile you can fix it manually be following the guide described in issue 128326. *** This issue has been marked as a duplicate of 128326 ***