Bug 78082

Summary: [1.5][search] FieldReferenceMatch in static import should not include qualifier
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 77622    

Description Markus Keller CLA 2004-11-08 11:55:08 EST
I200411050810

import static java.lang.Math.PI;
public class XY {
	double pi= PI;
	double pi2= java.lang.Math.PI;
	double e=Math.E;
}

Search for references to Math.PI

=> The match in the static import includes the qualifier "java.lang.Math.",
whereas the match in the class body does not. References to fields should either
always include the qualifier or never. I opt for never (no change for pre-1.5 code).
Comment 1 Frederic Fusier CLA 2004-11-14 11:08:42 EST
Just an incorrcect implementation. Of course, agree for never.
Comment 2 Frederic Fusier CLA 2004-11-17 13:34:19 EST
Fixed.

Now match does not include the qualifier in static import.

[jdt-core-internal]
Changes done FieldLocator.matchLevelAndReportImportRef(...)
Test case added in JavaSearchTests
Comment 3 Olivier Thomann CLA 2004-12-14 15:31:18 EST
Verified in 200412140800