Bug 117020 - [search] Search for '*' does not report empty packages
Summary: [search] Search for '*' does not report empty packages
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 140992 (view as bug list)
Depends on:
Blocks: 111501
  Show dependency tree
 
Reported: 2005-11-18 06:35 EST by Benno Baumgartner CLA
Modified: 2006-05-10 03:54 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2005-11-18 06:35:23 EST
Version: 3.2.0
Build id: I20051116-1332

Create a new java project
Add an empty package to the project
Search -> Java ->
  Search String: *
  Search For: Package
  Limit To: Declarations

Search does not find the empty package.

Even if you search for the package (search string= package name) the package is
not reported.

The problem seams to be located in:
MatchLocator#locatePackageDeclarations :

IPackageFragment pkg = (IPackageFragment) pkgs[k];
IJavaElement[] children= pkg.getChildren();
if (children.length > 0 && ...) {
   ... report match ...
}
Comment 1 Frederic Fusier CLA 2005-11-28 12:13:19 EST
Problem rightly came from this condition, thanks for the job :-)

Fixed and released in HEAD.

Test case added in JavaSearchTests
Comment 2 Jerome Lanneluc CLA 2005-12-13 10:34:50 EST
Verified for 3.2 M4 using build I20051213-0010
Comment 3 Frederic Fusier CLA 2006-05-10 03:54:34 EDT
*** Bug 140992 has been marked as a duplicate of this bug. ***