Bug 83319 - [1.5][search] Search does not find references to statically imported methods
Summary: [1.5][search] Search does not find references to statically imported methods
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-20 11:54 EST by Markus Keller CLA
Modified: 2005-03-30 15:18 EST (History)
0 users

See Also:


Attachments
Patch for the implementation of this functionality (6.79 KB, patch)
2005-03-01 07:30 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 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