Summary: | Type reference not found in jar file if sources was not already opened | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | arielah |
Version: | 3.2 | ||
Target Milestone: | 3.2 M5 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 130978 |
Description
Frederic Fusier
2006-02-03 06:28:44 EST
This is a problem with source attachement. In PackageFragmentRoot.getSourceMapper method first call, mapper == null but unfortunately sourcePath is also null... Search Engine then considers there's no source and uses ClassFileMatchLocator which fails to find this kind of reference (known limitation...). Note that it works properly after having opened editor either on A.java or B.java even after a shutdown/restart of eclipse session. It only fails just after having created the project or closed/reopened it... Changed PackageFragmentRoot#getSourceMapper() to attach the root to itself if none specified. Also removed code in ClassFile#openBuffer(...) that was duplicating this work and improved SourceMapper to pass in the IBinaryType when possible. Added regression test JavaSearchBugs#test126330() and changed existing Java search tests that assumed that attaching a null souurce path would not find the source by extracting the source of existing jars in a different zip file. Verified for 3.2 M5 using build I20060214-0010. *** Bug 130978 has been marked as a duplicate of this bug. *** |