Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323635

Summary: [search] Search doesn't find reference to field in anonymous binary class
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Satyam Kandula <satyam.kandula>
Status: RESOLVED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: frederic_fusier
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2010-08-25 12:46:47 EDT
I20100824-1210

Search doesn't find reference to a field of a top-level class in an anonymous binary class.

Steps:
- add the JUnit 4 library to the build path of a Java project
- search for references to field "org.junit.runners.ParentRunner.fSorter"

=> 2 references are found (in sort(Sorter) and sortChild(T)), but there's a third reference in org.junit.runners.ParentRunner.comparator().new Comparator() {...}.compare(T, T)
Comment 1 Frederic Fusier CLA 2010-08-25 12:53:29 EDT
Satyam, please investigate, thanks
Comment 2 Satyam Kandula CLA 2010-08-30 10:27:43 EDT
This looks like a duplicate of bug 151389. Thought bug 151389 talks about doubly-nested anonymous, it does happen for all anonymous. 

The search engine does find the source element, but when it tries to create the appropriate model element, it doesn't know the proper class file to search for.
Comment 3 Markus Keller CLA 2010-08-30 10:39:40 EDT
(In reply to comment #2)
> This looks like a duplicate of bug 151389. Yes, this is the same case as
bug 212065, which is already marked as dup.

*** This bug has been marked as a duplicate of bug 151389 ***