Bug 83319

Summary: [1.5][search] Search does not find references to statically imported methods
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 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch for the implementation of this functionality none

Description Markus Keller CLA 2005-01-20 11:54:11 EST
I20050118-1015

Search does not find references to statically imported methods. It findes all 3
references to fTime, but only one to getTime():


import static p.A.getTime;
import static p.A.fTime;

public class A {
    public static int fTime= 1;
    public static int getTime() {
        return ++fTime;
    }
}

class B {
    void use() {
        int t= getTime();
        t= fTime;
    }
}
Comment 1 Frederic Fusier CLA 2005-03-01 07:27:21 EST
Fixed.

Now search engine finds reference of static method in import declarations.
However, it still fails to find them in unused import...:-(
But I think it could be interesting to have "standard" case working and I'll
address this remaining issue in a new bug I'll open...

[jdt-core-internal]
I'll attach patch file for changes done to implement this functionality.
New test cases for static import method added and previous one refactored in
JavaSearchTests: testStaticImport*
Comment 2 Frederic Fusier CLA 2005-03-01 07:30:54 EST
Created attachment 18378 [details]
Patch for the implementation of this functionality
Comment 3 Frederic Fusier CLA 2005-03-01 07:51:02 EST
Bug 86901 addresses issue for unused import...
Comment 4 Olivier Thomann CLA 2005-03-30 15:18:00 EST
Verified in I20050330-0500