Bug 577013

Summary: Find references of classes/interfaces in String literals
Product: [Eclipse Project] JDT Reporter: Julian Ruppel <julian.ruppel>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 4.21   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Literal finds referenced class
none
Referenced class does not find literal none

Description Julian Ruppel CLA 2021-11-02 13:57:26 EDT
Created attachment 287426 [details]
Literal finds referenced class

If I have a class that is mentioned in a String literal, e.g. a JPA SQL query, this occurrence is not found when I search for references in the workspace.

However, it seems that the literal has already some kind of knowledge about the referenced class as it is capable to identify and link to the correct class.

See screenshots.

So, since the base capability apparently is already there, I propose to include the String literal search in the Find References functionality.
Comment 1 Julian Ruppel CLA 2021-11-02 13:57:55 EDT
Created attachment 287427 [details]
Referenced class does not find literal