Bug 151189

Summary: [search] Declaration search does not find all matches
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 3.2   
Target Milestone: 3.3 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch
none
New proposed patch none

Description Dani Megert CLA 2006-07-20 03:41:12 EDT
R3.2 and I20060718-0800 (refactoring and Ctrl+T are not affected)

I have all relevant methods in source (JDT Text, JDT UI, Platform Text and also JDT Debug and Ant).

1. open AdaptedSourceViewer.doOperation(int)
2. select doOperation in the Outline view
3. search for its declarations in workspace (yes: workspace)
==> BUG: all inherited (super) methods below JDT UI are missing

NOTE: if you select the method from a lower plug-in and then do the same you get more and more results the deeper you go. If I select ITextViewer.doOperation then all methods are found.

Same scoping bug when searching the declarations in the hierarchy.
Comment 1 Martin Aeschlimann CLA 2006-07-20 11:56:16 EDT
JDT UI is setting up the same search, but the scope is 'SearchEngine.createHierarchyScope(type);'
Comment 2 Frederic Fusier CLA 2006-08-16 08:07:13 EDT
Reproduced. This happens as soon as org.eclipse.jface.text plugin is imported as source: search engine only finds 2 matches although it finds 6 ones when this plugin is imported as binary plugin (or not in workspace).
I'll investigate...
Comment 3 Frederic Fusier CLA 2006-08-16 11:22:02 EDT
Created attachment 48022 [details]
Proposed patch
Comment 4 Frederic Fusier CLA 2006-09-07 03:30:07 EDT
Created attachment 49583 [details]
New proposed patch

Previous patch was not correct as it searched in prereq project also for fields. This was not correct as polymorphic search only concerns methods...
Comment 5 Frederic Fusier CLA 2006-09-07 03:31:06 EDT
Released for 3.3 M2 in HEAD stream (regression test case was included in the patch).
Comment 6 David Audel CLA 2006-09-18 10:04:52 EDT
Verified for 3.3 M2 using build I20060918-0010.