Chapter 2. New and Noteworthy

Table of Contents

v0.5
Bugzilla Summaries
New Feature Namespaces
Removal of Project Builder and Nature
Completion Engines completely based on JDT
JDT-based Call Chain Completion
Extended Documentation Platform
Improved Subwords Completion
Temporary Deactivation of Template Completion
Forecast: New Local Code-search
v0.4
Maintenance Release
v0.3
Subwords Completion
v0.2
Chain Completion
Templates Completion Engine
v0.1
Calls Completion
Overrides Completion
Eclipse Help

v0.5

Planned for 2012-02-XX, first official release. Formal review needs to be scheduled.

Bugzilla Summaries

New Feature Namespaces

We outgrew our initial naming scheme. For v0.5 we changed the namespace of our features and plug-ins completely. As result, using the update manager wont work as expected. You have to uninstall previous versions and install code recommenders from one of our update sites .

Removal of Project Builder and Nature

Earlier version of Code Recommenders required to activate Recommenders on a per-project basis. This activation added a builder to the project that analyzed file changes whenever Eclipse decided to run the builders (on save or on workspace fresh etc.) and stored the analysis results in a .recommenders/ folder. With v0.5 this is not required anymore. Code Recommenders now analyzes the compilation unit on-the-fly whenever code completion is triggered. Developers now can easily use Code Recommenders without changing any project configuration file. Just install-and-go.

Important

Please note that currently only Eclipse APIs like JFace, SWT, Workbench etc. are supported. Adding support for other frameworks is planned for v0.6 and v0.7.

Completion Engines completely based on JDT

Related to the previous change, we also switched from the WALA bytecode analysis toolkit to Eclipse JDT as primary analysis tool for code completion. WALA will, however, still be the analysis toolkit of choice for sophisticated code analysis and data exports. There is yet no better analysis toolkit available that suites our needs.

JDT-based Call Chain Completion

With v0.5, Code Recommenders ships a new version of its chain completion engine completely based on JDT. Thanks to Marko Martin who contributed this to Code Recommenders. Since this code is a major rewrite of the existing engine, please report any issues you experience to bugzilla.

Extended Documentation Platform

Based on Stefan Henss' work in this year's Google Summer of Code project, this release ships with an updated version of Stefan's Extdoc View . Internally, we changed the code to be easily extensible by other contributors. Check Extended Documentation Platform ISV documentation for more details on that.

Improved Subwords Completion

For assignments, subwords completion now takes into account the variable name of the assignment.

The exact implementation of the matching and ranking strategy is subject to change. If you have ideas on how to improve the current strategy, look at the code and send your ideas to the forum .

Temporary Deactivation of Template Completion

In v0.2 we added a new template completion engine to Code Recommenders. Due to the large internal refactorings, this engine was left out of this release but will be added again in v0.6.

Forecast: New Local Code-search

Yet, Code Recommenders ships without official code search support. However, there is some work going on in this area. Previous updates offered first draft of code-search client in the experimental section of the update site. For v0.5 we removed this feature from the update sites as it's currently developed by Tobias Boehm, a Student at Darmstadt University of Technology as part of his Master thesis. For the curious, the sources can be found in Code Recommenders' Labs repository . If you are interested in bleeding edge state of (local) code-search, there is also an temporary update site . Please send your questions regarding local code-search to the forum .

v0.4

Published on 2011-11-07

Maintenance Release

This is a maintenance release without any new features.

v0.3

Published on 2011-08-26

Subwords Completion

Sometimes you just don't know the complete name of a method - or entering its full name from the first character? Subwords is here to assist.

Completion on method calls:

Completion on variables:

Completion on method overrides:

Subwords has been mainly developed by Paul-Emmanuel Faidherbe and contributed to Eclipse Code Recommenders. Thank you Paul-Emmanuel!

Subwords currently has some limitations:

It doesn't support dynamic reranking of proposals with better/larger overlaps. It only works in the scenarios shown above. Typename completions are yet not possible. You may find more limitations as you go. Please send your feature requests and bugs to Bugzilla. A thread discussing this contribution is here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350000

v0.2

Published on 2011-03-01

Chain Completion

How many times did you ask yourself "How do I get an instance of X?" And how much time did you spent with shimming from one method call to another to find a call chain returning the type you were looking for?

Clearly, by far too long. Code Recommenders' new chain completion engine supports you in finding all applicable call chains and thus saves you lots of time when learning new APIs. How does it work? In a nutshell, Code Recommenders takes the current context code completion was triggered in and starts a search on all local variables, fields and methods of the enclosing class recursively until a path to the requested type is found (or a time out occurred :D). If it could find some valid paths, it generates ready-to-use code snippets the developer can immediately insert into her code. Look at the screenshots below for some examples:

Completion on this

Completion on static types

Completion on method returns

Completion with type cast

Templates Completion Engine

Have you ever wondered how to deal with a new framework's objects? Or got tired by continuously writing the same procedures, e.g. instantiating an object and calling a bunch of setters!? For this Eclipse contains standard-templates but they are only few and writing new is time-consuming and often difficult to do.

Our templates completion engine provides templates dynamically created on completion requests. They are not manually crafted but obtained from frequent patterns found in real-life framework usage, i.e. you are instantly served with the most common practices. For this not only the object type is considered, but also what has already been done with the variable itself - our templates are context-sensitive! You can see how they adopt to different occasion in the following screenshots. With this the new templates completion engine provides valuable dynamic shortcuts for frequent code blocks and is also able to guide framework novices with relevant examples.

Completion for Local Declaration

Dynamic Pattern Completion

v0.1

Published on 2011-02-15

Calls Completion

Completion on Declared Variables

Completion on This

Completion on Anonymous Method Returns

Completion from Anonymous Inner Classes

On-the-fly Code Analysis

Code Recommenders performs several static analyses on your code whenever you save your editor contents. However, sometimes you work a while with a dirty editor (i.e., editor contains un-safed changes). If code completion now was triggered on variables added after the last save code recommenders couldn't make any recommendations for these variables. This update now contains an on-the-fly analyzer that performs a flat analysis of your current method body whenever code completion is triggered on a previously unknown variable based on the information it obtains from the JDT AST.

Performance Improvements

Code Completion's performance has been improve quite a lot. However, the loading of recommender models may take a second and thus may slow down your code completion on the first load. After the models are loaded, code completion usually takes between 10 to 50 ms.

Overrides Completion

Completion on Class Body

Eclipse Help

Code Recommenders follows the model of EGit and Mylyn and maintains its user and developer guides as well as its new and noteworthy release notes in wiki.eclipse.org. This allows developers and users likewise to edit and comment on existing documentation. The latest version of these wiki pages are automatically integrated into the latest Eclipse Help plug-in and changes are available immediately to you.