Community
Participate
Working Groups
I think the javac compiler complains when I try to access static fields of a class using a concrete object. However, eclipse proposes static fields as suggestions in code assist. This is very annoying. For example, take the org.eclipse.jdt.internal.compiler.ast.Expression class. It inherits many static fields. But when I have Expression exp = .... exp.<CTRL+SPACE> I don't want to see them all.
The compiler optionally warns you that this is a bad idea. However, it is still legal in Java. Such completions should though always be less relevant than the non-static ones. David - please consider this relevance improvement (and possibly an option to prevent them completely too).
relevance improvement: when member is non-static then relevance is higher. In the following example 'var2' is more relevant than 'var1' ('var2' is the first proposal). public class X { static int var1; int var2; void foo() { this.var<cursor> } } Fixed.
Verified.
Great! I will check it.