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.
Not sure where exactly problem is. But the easiest steps to reproduce. 1) Go throgh whatever wizard which needs some NB dependencies (i.e. adds them to the project.xml) 2) Lines like: import org.openide.WizardDescriptor; are underlined by red color - related packages cannot be found. Seems that IDE restart helps - ugly workaround.
Hmm, whatever the problem is, it wasn't covered by our unit tests... I rewrote my changes to the evaluator repeatedly to get everything to pass.
It's working fine for me. I make a new suite component module. I run e.g. Action or Wizard wiz. The generated code looks fine and I get a green box for it.
Just happened to me, but not via the steps you describe. Had opened core module, was OK, did some refactoring (*not* changing project metadata), and suddenly Compile Classpath was empty. No idea how to reproduce.
I can reproduce sometimes but not always. I thought the use of PM.mutex.readAccess(Runnable) could be responsible, as that can be asynch, but even after fixing that the problem still happens sometimes.
Looking at it, I think this is a result of issue #67842. When the bug happens, one or more of the classpaths for the project is empty. There is no indication that ${cp} is incorrect in the evaluator. Rather, it seems that ProjectClassPathImplementation is letting the PropertyEvaluator it was constructed with be garbage collected, and then returning an empty classpath! This is definitely wrong. The PCPI must hold a strong ref to the PE. As far as issue #67842 goes, I think it should reverted. If other parts of the IDE hold strong refs to a ClassPath which they are not actively using, they should be fixed to not do so. Would be possible to work around the java/project bug in apisupport/project by returning only one PropertyEvaluator from the project ever, using a different delegation system than is currently used. But that would just mean someone else trying to use PCPI would encounter this problem sooner or later.
I will just revert the patch to PCPI, it is too evil.
Reverted.
Did not spot since - verified.