Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Eclipse - JDT parsing error?

Hello!

    First I would like to thank everyone for good work. Eclise is a really
good IDE and refactoring tools is very helpfull. In fact, my colleagues at
work using JBuilder and they were impressed by Eclipse abilities.

    I think I have found a bug in JDT - java code parsing(compiling?). Here
is the example class:

=========== FirstClass.java =======

public class FirstClass {

 public static final class InnerClass {
  public static final int INNER_CONSTANT = 0;
 }

 public static void main(String[] args) {
  FirstClass one = new FirstClass();
  /* The line below produces error message:
    one.InnerClass cannot be resolved or is not a field FirstClass.java */
  System.out.println("CONST: " + one.InnerClass.INNER_CONSTANT);
 }
}

=============================

As you see, there is nothing criminal I do, in fact, it is compiles fine
under SUN`s javac.
The thing I believe which confuses Eclipse java parser is access to inner
static class of enclosing class` instance.

p.s. Sorry but i am not subscribed to jdt-dev mailing list.

With great enthusiasm,
Ruslan Gainutdinov contact@xxxxxxxxxx
http://ruslan.org/







Back to the top