Bug 7597 - PackageFragmentRoot which are archives loose associated resource
Summary: PackageFragmentRoot which are archives loose associated resource
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 3658
  Show dependency tree
 
Reported: 2002-01-15 08:40 EST by Claude Knaus CLA
Modified: 2002-01-18 10:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claude Knaus CLA 2002-01-15 08:40:07 EST
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.
Comment 1 Philipe Mulet CLA 2002-01-15 10:12:46 EST
Please investigate
Comment 2 Jerome Lanneluc CLA 2002-01-18 10:09:03 EST
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.