Community
Participate
Working Groups
Build 20030221 1. Start runtime workspace under debug 2. Create Java project Test (with prj=src=bin) 3. Add class X.java in Test 4. Close project Test 5. Put a breakpoint in IndexAllProject on line 294 (last line of execute()) 6. Open project Test 7. When the breakpoint is hit, leave the Java Indexing thread suspended 8. Edit Test's claspath so that it now have a 'src' source folder and no more proj=src. 9. Resume Java Indexing thread 10. Open Type... Observe: X is returned (it is still in the index) When setting the classpath, we should always post an IndexAllProject job (and remove the jobs of the same family)
I believe this can cause the Java model tests to fail intermitently.
Actually, the work in SetClasspathOperation is ok. The problem comes from the fact that IndexManager.removeSourceFolder(...) looks at the running job to determine if the request should be made or not. If an IndexAllProject job has already started, this check is wrong. Changed title to reflect the real problem.
We should fix all cases were we look at the job queue before adding a job. We should never consider the active job (i.e. the one at jobStart) as it may have already started.
Fixed IndexManager.indexAll, indexLibrary, indexSourceFolder, removeSourceFolder to not consider the job at jobStart.
Verified.