Bug 565180 - Field reference in a jar without source is not searched
Summary: Field reference in a jar without source is not searched
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.17   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-13 07:57 EDT by Vikas Chandra CLA
Modified: 2022-11-04 19:59 EDT (History)
2 users (show)

See Also:


Attachments
test project (2.51 KB, application/zip)
2020-07-13 07:57 EDT, Vikas Chandra CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vikas Chandra CLA 2020-07-13 07:57:13 EDT
Created attachment 283579 [details]
test project

project_with_source.zip ( attached)  is the zip file containing project java project jp. Import ->Existing Project ->Select Archive
Search for c1 as type and all occurrences . You can see 3 occurrences ( Correct !!)
 
Now export this project as jar (without source ). Close project jp. Create an empty Test java project and add
this jar in Java build path.
Search for c1 as type and all occurrences  ( by default Library search is on) . You can see only 1 occurrence 

The field reference of class c1 in class c2 is not shown.
Comment 1 Vikas Chandra CLA 2020-07-14 06:31:46 EDT
When the jar with source is used, SourceIndexer comes into play which uses SourceElementParser and then it adds addConstructorReference which adds the
reference of c1 ( which is a field in c2 class) in the indexer. There is
no equivalent parser for BinaryIndexer and hence indexer is unable to spot such references.
Comment 2 Eclipse Genie CLA 2022-11-04 19:59:37 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.