The original architects of Eclipse knew that developing a single IDE that met everybody’s needs was an impossible task. Instead of trying to boil the ocean, the team opted for an extensible model, in which others could help contribute by writing interesting plugins. If Eclipse could provide a solid foundation, then others could help drive innovation forward — and we all benefit. Number 2 on my Juno Top 10 List — code recommenders — is an example of great innovation on top of a fantastic platform.
The Code Recommenders is a plugin for the Eclipse Java Development Tools that helps manage the complexity of large APIs, by means of intelligent code completion, extended documentation, smart bug detection, and more. The knowledge the plugin contains comes from large of amount of analysis which has been performed, and is fed back into the IDE.
Code Recommenders must first be configured with a knowledge base (Model Repository Reference).
Using this knowledge, code recommenders can take a complex content assist (like the methods available on a Button):
And display a much more civilized list, based on common usage patterns:
In addition to call recommendations, you can also see a list of methods which are frequently overridden when extending a class:
Code Recommenders can also help you learn a new API by organizing the common templates when working with a single Object. For example, here we see how SWT Buttons are offen instantiated and used:
Moving beyond single call completion, code recommenders can also help you see call chains. As any Eclipse plugin developer knows, you often get into deep call chains trying to get the Active Window, Status Line Manager, etc…
There is also support for a powerful subword completion feature. This means you don’t need to know the entire method (or class name) to make use of content asset:
There is also a very useful Extended Documentation view which shows information about how often certain methods are called / overridden, etc… A great resource when learning a new API.
If you are a Java developer using Eclipse, make sure you give this plugin a try when installing Juno. A huge thank-you goes out to Marcel Bruch for this great tool! Marcel also had some help from Cheng Chen, Doug Wightman, Johannes Lerch, Stefan Henss and Sebastian Proksch, Thanks so much everyone!
For more Eclipse Tips and Tricks (and the annual Top 10 List), why not follow me on twitter: