Today I've accidentally found a pretty cool feature of Eclipse
autocompletion: It will recognize instanceof checks and offer the
method of the checked class.
See the following image:
I pass an Object and check if it is a JPanel. Inside the if block I
get all the methods of JPanel when I query for available methods on o.
And now see the result when I check a method:
Eclipse automatically created the cast to JPanel and added the method
call. Pretty impressive how intelligent the autocompletion of Eclipse
got.