Community
Participate
Eclipse IDE
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.
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.
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
Fix released to HEAD. Changes to SourceBasedSourceGenerator.
Released fix to 3.1 maintenance stream as well.
Please verify, Luc.
Verified.