Category Archives: Eclipse

Eclipse Code Recommenders

Roughly a year ago, I attended a talk held by a very charismatic Marcel Bruch. Why, he asked, don’t we use the collective brains of the Java developer community? The Eclipse plugin written by his team does just that: Eclipse Code Recommenders observes what developers are doing to provide better code completions.

Eclipse autocompletion drives me crazy!

The idea is simple. Sooner or later, probably every developer gets nuts because Eclipse autocompletion suggests the same odd completions over and over again. For instance, some AWT classes are frequently at the top of the list. When I joined the Java world – that’s a long time ago, when Java 1.2 was new – AWT has already been legacy, having been superseded by Swing. So why does it appear in the list at all? Let alone at the top?
Continue reading

Eclipse Compiler Surprises

I guess you know exactly what the class file of this Java source code looks like:

public class MyClass {
   public void myMethod() {
     I do not compile

You don’t have to know anything about byte code to know this class doesn’t compile. Asking for the byte code is a moot point: obviously there’s no class file. Let’s have a look at the binaries folder, just for the fun of it:

Oops. Eclipse does a clever trick: it generates class files of invalid classes.
Continue reading