Bug 163984 - [search] no results from SearchEngine.searchAllTypeNames with types in scope
Summary: [search] no results from SearchEngine.searchAllTypeNames with types in scope
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.3 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 168125 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-09 12:10 EST by Michael Rennie CLA
Modified: 2006-12-15 05:29 EST (History)
3 users (show)

See Also:


Attachments
Proposed patch (4.51 KB, patch)
2006-11-17 07:32 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2006-11-09 12:10:17 EST
It seems changes to the open type dialog, are causing items passed in to the dialog as part of a search scope to not be shown.

for example: if you have a package with 5 classes in it and each of those classes has a main method in it, and you then right-click on the package and select Run As -> Java Application, the dialog appears empty.

This used to work, and would display all of the classes that contain main methods in them. This also affects the launch dialog on the main tab for Java applications, where you can no longer search for main methods within the associated project.

In each case we are collecting the correct set of IJavaElements, passing them in to the dialog using the JavaUI.createTypeDialog(..) as an IJavaSearchScope, and nothing appears anymore.....
Comment 1 Martin Aeschlimann CLA 2006-11-16 07:03:55 EST
It seems that the search engine doesn't report any result. We switched to use the new API that uses a TypeNameMatchRequestor.

- set a breakpoint in 
SearchEngine.searchAllTypeNames(char[], int, char[], int, int, IJavaSearchScope, TypeNameMatchRequestor, int, IProgressMonitor)
  and
org.eclipse.jdt.internal.ui.dialogs.TypeInfoViewer.SearchRequestor.acceptTypeNameMatch(TypeNameMatch)

- create project A and classes p.A, p.B, p.C that all have a 'main' method.
- select package 'p' and invoke 'Run as Java Application'
- first breakpoint is reached it the arguments seem correct to me, the scope is special (3 types), but used to work.

Comment 2 Frederic Fusier CLA 2006-11-17 07:32:47 EST
Created attachment 54067 [details]
Proposed patch
Comment 3 Frederic Fusier CLA 2006-11-17 07:33:10 EST
Released for 3.3 M4 in HEAD stream.
Comment 4 David Audel CLA 2006-12-12 06:14:34 EST
Verified for 3.3M4 with I20061212-0010.
Comment 5 Frederic Fusier CLA 2006-12-15 05:29:43 EST
*** Bug 168125 has been marked as a duplicate of this bug. ***