Bug 45254 - Java Search not finding all references
Summary: Java Search not finding all references
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-21 02:39 EDT by Wassim Melhem CLA
Modified: 2003-10-21 15:03 EDT (History)
0 users

See Also:


Attachments
This is the result returned by Java Search (3.20 KB, image/gif)
2003-10-21 02:44 EDT, Wassim Melhem CLA
no flags Details
Problems view (12.21 KB, image/gif)
2003-10-21 02:45 EDT, Wassim Melhem CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wassim Melhem CLA 2003-10-21 02:39:17 EDT
Build: 3.0 M4

I have org.eclipse.pde.core and org.eclipse.pde.ui checked out from CVS.  
Everything else imported as binary without links.

I opened the class org.eclipse.pde.internal.core.ClasspathUtilCore.
I selected the static class 'setClasspath'.
From context menu, references > Workspace.  I got one match.  I knew for a 
fact, there was more than one reference.  So I commented out the method and 
saved.  Sure enough, there were five compilation errors.  I will attach screen 
shots.

Once upon a time, search used to be solid like a rock.  Recently however, I 
have been experiencing false search results very often.
Comment 1 Wassim Melhem CLA 2003-10-21 02:44:12 EDT
Created attachment 6502 [details]
This is the result returned by Java Search
Comment 2 Wassim Melhem CLA 2003-10-21 02:45:34 EDT
Created attachment 6503 [details]
Problems view

These are five compilation errors that resulted from commenting out the method
which Java search indicated that it is referenced only once in the workspace.
Comment 3 Kent Johnson CLA 2003-10-21 14:10:06 EDT
I followed your steps exactly & I get 5 matches. Can you reproduce this in a 
new workspace?

As for your current workspace, if you delete your index files in the 
directory .metadata\.plugins\org.eclipse.jdt.core, is it still reproduceable?

If not, then somehow in the last while, your index files have become out of 
date. This would explain the flakeness you've seen lately.
Comment 4 Wassim Melhem CLA 2003-10-21 14:26:28 EDT
Thanks Kent.  Deleting the JDT core metadata solved and reindexing solved the 
problem.
Comment 5 Kent Johnson CLA 2003-10-21 14:46:19 EDT
Can you think of any reason why your index files would have become stale?

When did you first start noticing the flakeness?
Comment 6 Wassim Melhem CLA 2003-10-21 15:03:57 EDT
Not sure.  This is actually a relatively new workspace.  I created it a day or 
two before 3.0M4.
The flakiness started happening right away.  It manifested itself in different 
forms.  another example was the Open type dialog.  I would type in the name of 
a class which I know exists in my workspace; yet the dialog would not find it.