Bug 102427 - Cannot inspect/display static import methods
Summary: Cannot inspect/display static import methods
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Luc Bourlier CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-30 20:45 EDT by Barry Kaplan CLA Friend
Modified: 2005-08-05 10:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Kaplan CLA Friend 2005-06-30 20:45:37 EDT
Consider:

---
public class Helper {
    public static int getValue() {...}
}
---
import static Helper.*;

public class Doer {
    public void doit() {
        int i = getValue();
    }
}
---

When debugging, if you select 'getValue()' in the method 'doit' and execute
display (or inspect) you get an error indicating that the method 'getValue()' is
not undefined for type Doer.
Comment 1 Tim Moreton CLA Friend 2005-07-10 13:38:56 EDT
I've found that this also applies for constant fields. Test case:

package test;
public class A {
	public static void main(String[] args) {
		System.out.println(HELLO);
	}
}

package test;
public class B {
	protected final static int HELLO = 1;
}

Suspending on the line in main() and doing an inspect on HELLO fails. Comment
out the static import, add "B." in front of HELLO, and it works.
Comment 2 Tim Moreton CLA Friend 2005-07-10 13:40:19 EDT
Sorry, I should add this is 3.1 RC4, haven't had chance to test on release yet.

eclipse.buildId=I20050624-1300
java.version=1.5.0_04
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_GB
Command-line arguments:  -os linux -ws gtk -arch x86
Comment 3 Darin Wright CLA Friend 2005-07-19 10:36:00 EDT
Fix released to HEAD. Changes to SourceBasedSourceGenerator.
Comment 4 Darin Wright CLA Friend 2005-07-19 10:42:03 EDT
Released fix to 3.1 maintenance stream as well.
Comment 5 Darin Wright CLA Friend 2005-07-19 10:42:17 EDT
Please verify, Luc.
Comment 6 Darin Wright CLA Friend 2005-08-05 10:21:44 EDT
Verified.