Bug 210691 - [search] Type references position invalid in import references when using "*" pattern
Summary: [search] Type references position invalid in import references when using "*"...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-22 12:57 EST by Frederic Fusier CLA
Modified: 2007-12-11 09:46 EST (History)
1 user (show)

See Also:


Attachments
Proposed patch (4.79 KB, patch)
2007-11-22 13:15 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 Frederic Fusier CLA 2007-11-22 12:57:18 EST
Using HEAD.

Search for all types references using the string pattern "*" in JavaSearch dialog (select only Sources) with the simple following test case:
Test.java
  import java.util.List;
  public class Test {
    List list;
  }

Observe the match in import declaration: only 'java' is selected! I would expect to have all qualified name selected: 'java.util.List'
Comment 1 Frederic Fusier CLA 2007-11-22 12:58:36 EST
Problem is in MatchLocator.reportAccurateTypeReference(SearchMatch, ASTNode, char[]) method. It should not parse the reference when the name is null.
Comment 2 Frederic Fusier CLA 2007-11-22 13:15:21 EST
Created attachment 83558 [details]
Proposed patch
Comment 3 Frederic Fusier CLA 2007-11-23 03:53:33 EST
Released for 3.4M4 in HEAD stream.
Comment 4 Jerome Lanneluc CLA 2007-12-11 09:46:26 EST
Verified for 3.4M4 using I20071211-0010