Community
Participate
Working Groups
20020109-I w2k and linux: 1) Add a binary project to the workspace (e.g. org.eclipse.jdt.core). If the project existed already, delete it first. 2) Open a class from a binary project (e.g. org.eclipse.jdt.core.IJavaElement) 3) Do a search (CTRL-H) for the IJavaElement type declaration. 4) The search marker appears in the displayed file. 5) Shutdown and restart Eclipse. 6) Do the same search from 3) again. 7) Observe how the search markers do not appear. I debugged a bit and it looks like the PackageFragmentRoot associated with jar file has its resource field (fResource) set to null. The resource locator used in the ClassFileDocumentProvider to get the jar file then falls back to the surrounding project. This is why the marker deltas are not processed correctly since the resources don't match.
Please investigate
When restoring the IPackageFragmentRoot handle, getPackageFragmentRoot(String) was used instead of getPackageFragmentRoot(IPath). The former assumes that the string is a path to an external jar (thus it doesn't have an associated resource). Changed it to used the latter.