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.

Bug 67973 - Classpath is not updated
Summary: Classpath is not updated
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM, REGRESSION
Depends on:
Blocks: 67842
  Show dependency tree
 
Reported: 2005-11-02 10:21 UTC by Martin Krauskopf
Modified: 2005-12-23 11:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2005-11-02 10:21:26 UTC
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.
Comment 1 Jesse Glick 2005-11-02 18:48:30 UTC
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.
Comment 2 Jesse Glick 2005-11-02 19:00:27 UTC
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.
Comment 3 Jesse Glick 2005-11-02 22:46:55 UTC
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.
Comment 4 Jesse Glick 2005-11-02 23:06:11 UTC
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.
Comment 5 Jesse Glick 2005-11-02 23:39:45 UTC
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.
Comment 6 Jesse Glick 2005-11-03 03:00:14 UTC
I will just revert the patch to PCPI, it is too evil.
Comment 7 Jesse Glick 2005-11-03 03:52:02 UTC
Reverted.
Comment 8 Tomas Danek 2005-12-23 11:34:15 UTC
Did not spot since - verified.