Community
Participate
Working Groups
Sometimes rt.jar is not indexed. The result is that all the search request does not show the types in rt.jar.
To show the the problem you need the follow these steps 1) put a break point just after startIndexing() in JavaCore#startup() 2) put a break point inside IndexManager#indexAll() 3) launch eclipse in the debugger 4) steps inside the indexAll method, you can see that rt.jar is not indexed.
Several issues on this front: 1. if the project isn't opened yet, the indexer will not attempt to resolve the variable entries on the classpath, and thus miss potential libraries in this way. The rational is that it wants to avoid running CP initializers (potentially) in the indexer thread, since it may cause some deadlocks. This is mostly affected the early index consistency check. 2. a recent change to the IndexSelector is causing it to always ignore the index on disk, if it hasn't been loaded into memory already (likely through the index consistency check - even after fix for 1). This change wasn't in F2 builds, but introduced since then (see bug 18621). Need the two fixes.
Fixed both: 1. indexAll(IProject) now simply resolves the classpath and will find all referenced libs. 2. senders are all ensuring that the corresponding CP have been resolved at least once before 3. IndexSelector is now able to load the existing file index BUT not creating an empty one if missing (was bug 18621)
*** Bug 18680 has been marked as a duplicate of this bug. ***
*** Bug 15972 has been marked as a duplicate of this bug. ***
Verified.