Bug 97547

Summary: [search] Package search does not find references in member types import clause
Product: [Eclipse Project] JDT Reporter: Maxime Daniel <maxime_daniel>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dirk_baeumer
Version: 3.1   
Target Milestone: 3.1 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to fix this issue
none
Test case added to JavaSearchBugsTests
none
Modified jclMin1.5.jar
none
Modified jclMin1.5src.zip none

Description Maxime Daniel CLA 2005-05-31 11:54:35 EDT
Build I20050527-1300.
Create package p.
Create types X and Y as follows:
---- X
package p;
public interface X {
	public interface X1 {
	}
}
---- Y
package p;
import p.X.*;      // (a)
public class Y { 
}

Launch a search on package p's references. Returns 0.

As a side effect, a rename refactoring action on p fails to update line (a)
in Y.
Comment 1 Frederic Fusier CLA 2005-06-13 08:21:23 EDT
Created attachment 22908 [details]
Patch to fix this issue

Package reference locator *always* needs to verify if import reference tokens
may match pattern prefix as it was done for type references.
Currently it's only only when import reference is not on demand or is static.
Comment 2 Frederic Fusier CLA 2005-06-13 08:25:13 EDT
Created attachment 22909 [details]
Test case added to JavaSearchBugsTests

Note that this test case requires to change jclMin1.5.jar and jclMin1.5src.zip
files.
I'll attach them to this bug
Comment 3 Frederic Fusier CLA 2005-06-13 08:27:29 EDT
Created attachment 22910 [details]
Modified jclMin1.5.jar
Comment 4 Frederic Fusier CLA 2005-06-13 08:27:59 EDT
Created attachment 22911 [details]
Modified jclMin1.5src.zip
Comment 5 Philipe Mulet CLA 2005-06-13 12:06:37 EDT
+1 for RC3

Dirk - pls vote for this one. See impact on refactoring
Comment 6 Frederic Fusier CLA 2005-06-13 12:09:35 EDT
I've run JDT-UI tests (refactoring & automated) and they all pass...
Comment 7 Dirk Baeumer CLA 2005-06-13 17:41:31 EDT
+1.
Comment 8 Frederic Fusier CLA 2005-06-14 12:35:25 EDT
Fixed and released in HEAD.
Comment 9 Maxime Daniel CLA 2005-06-16 10:50:53 EDT
Verified using build N20050616-0010 + JDT Core HEAD.