Andreas Sewe's blog

Code Recommenders 2.2: Intelligent Constructor and Subtype completion for Eclipse Mars

Every year, the Eclipse community works in concert for the annual “release train”. And just like in previous years, the train arrived right on time. Since June 24th, Eclipse Mars is out – and with it Code Recommenders 2.2.0.

What’s New?

Code Recommenders 2.2 includes not one, but two new code completion engines: constructor completion and subtypes completion. Together, the two completion engines address one of the more annoying quirks of content assist in Eclipse: The looong list of irrelevant constructor proposals you get whenever you want to create a new instance of that type. Let’s look at them in detail.

Code Recommenders 2.1: Code Snippets for Eclipse Luna

Today, on 25 June 2014, the yearly Eclipse “release train” arrived at a download mirror near you – again right on time. This year’s Eclipse release, codename Luna, contains notable features like Java 8 support, the long-awaited dark theme, and Code Recommenders 2.1.

What’s New?

The big new feature in Code Recommenders 2.1 is Snipmatch (which Ian Bull nominated as his personal Top 4 feature of Eclipse Luna). But what’s Snipmatch, you ask? Snipmatch is an entirely new way to search for and insert code snippets provided to you by the community. Moreover, Snipmatch makes it easy for you to contribute back to the Eclipse community. Want to find out more? There’s already a two part blog post about searching (part 1) and sharing (part 2) code snippets with Snipmatch as well as a complete guide to snippet editing in the Code Recommenders manual. But long story short: Snipmatch offers you helpful code snippets at your fingertips – all it takes is Ctrl+Alt+Space.

Previously an incubator project of Eclipse Code Recommenders, Snipmatch has seen a flurry of activity in the past few months, with dozens of bugs fixed and several big enhancement made. Snipmatch now features a form-based snippet editor and a EGit-based workflow to snippet sharing, Gerrit code review included. 

And the Code Recommenders community has certainly been busy contributing new snippets to Snipmatch. About a month ago Snipmatch offered 75 snippets, modeled after Eclipse’s own templates. Less than a month later, it now stands at 107 snippets. That’s 32 new snippets, ready to use and easy to insert, contributed before Snipmatch is even released. Imagine how fast Snipmatch can grow with a much larger community! A big thank you goes to Miltos Allamanis, Johannes Dorn, and Olav Lenz for their contributions to both the Snipmatch plugin and its snippets.

If you are interested in the full details, please have a look at the quite comprehensive release review documentation for Code Recommenders 2.1. Or read on to see what’s ahead for Snipmatch in the coming months.

Code Recommenders 2.1 Early Access: What’s New? (part 2)

Last week, we have shown you how Snipmatch, Eclipse Code Recommenders’ all new code-snippet search engine, can help you find the right code snippet to solve your particular coding problem. You just hit Alt + Space and can immediately search a repository full of code snippets. But where do these snippets come from? That’s what we will show you this week.

In a nutshell, Snipmatch retrieves its snippets from a shared repository that is maintained by the community – and that includes you. In particular, you can create new snippets and share them with the whole Eclipse community.

How to sign your Eclipse project with Tycho

I am sure, every user of Eclipse has seen this message before:

Security Warning: Unsigned Content

As it turns out, it’s surprisingy easy to spare your users this worrying message – at least if you are building an Eclipse project rather than just a project that uses Eclipse. Thanks to Apache Maven, Eclipse Tycho and the Common Build Infrastructure effort of the Eclipse Foundation, properly signed bundles and features are just a few lines of XML away. Of course, as with all things Maven, finding the right XML incantation is not always that easy, so here’s the solution for you – ready to be copied & pasted into your project’s pom.xml.

Developers who called m() also called …: Livedoc 0.7 released

Livedoc, an incubator project of Eclipse Code Recommenders, has reached another milestone: Version 0.7 is right on time for Christmas.

So, what’s new in 0.7? Aside from several bugfixes you are in for a new treat taglet: the “Call also” taglet. This latest addition to Livedoc’s collection of taglets (powered by Code Recommenders) provides you with documentation of the form “Developers who called m() also called …”. Have a look at how this looks for Java’s HashMap class:

Upgrade Code Recommenders 1.x to Version 2.0.2

We are happy to announce that we just released the latest stable version of Code Recommenders, version 2.0.2, to the Eclipse Marketplace. And while a version like 2.0.2 may seem like a minor step forward, many of the under-the-hood improvements we made in version 2.0.1 now pay off in 2.0.2 in terms of new features.

So What’s New?

First of all, installing the latest and greatest version of Code Recommenders has become a lot easier for all the faithful users of Code Recommenders 1.x, like everyone who uses the pre-packaged Eclipse IDE for Java Developers or RCP and RAP Developers from the Eclipse Kepler release train. With version 2.0.2, we now have a clear update path from 1.x legacy versions to the all new Code Recommenders 2.x and all of its great new features. All you need to do to update is install Code Recommenders from the Eclipse Marketplace or directly from its update site.

Introducing Snipmatch Snippet-Sharing at Eclipse DemoCamps 2013

Join us in November for the next round of Eclipse DemoCamps. While this summer we unveiled the first crowd-sourced code-completion engine, this winter we will go one step further and bring you a new way to share “Code Snippets with the World (and Eclipse).” As the title suggests, we will show you how you can benefit from the collected code snippets of the community – and how you can contribute back!

Snippets and Extended Code Recommendations for Vaadin: Thinking of U and I and All of Us

If you are developing Java applications for the Web, chances are that you have tried Vaadin, an open source Web framework with a great, modern look and feel. Vaadin not only has excellent documentation but also a tight integration with the Eclipse IDE.

Still, Vaadin’s documentation sits on the Web, and you are working in your IDE. At Codetrails we asked ourselves, “Wouldn’t it be great if the IDE itself could help you learn the Vaadin framework?” We came up with a two part answer: Eclipse Code Recommenders and Snipmatch.

Eclipse Code Recommenders offers you recommendations on how to use the Vaadin framework based on how others have used it before, both in the form of intelligent code completion and API Docs. Snipmatch gives you instantaneous access to a collection of common code snippets supplied by the Vaadin Sampler. In either case, you never have to leave the comfort of your IDE.

To make setup as easy as possible, we bundled Eclipse Code Recommenders, Snipmatch, and all the recommendation models and code snippets created with our [ctrl]flow Miner in an easy-to-install package: Codetrails Vaadin Support. So here’s how to get recommendations and snippets for Vaadin:

Maven Tycho: How to configure your repositories’ mirror and statistics URIs

We at Codetrails build all our software, be it Eclipse Code Recommenders, the [ctrl]flow Miner, or Codetrails Connect, with the help of Apache Maven and Eclipse Tycho. And this works great! A simple mvn clean install produces a p2 repository (aka an update site) ready to be consumed by Eclipse. Recently, however, we needed two features of p2 repositories that are (yet) unsupported by Tycho: p2.statsURI and p2.mirrorsURL. And apparently we are not the only ones in need of these features, as Bugs 310132, 341744, and 401960 as well as numerous posts to the tycho-user mailing list can attest.

Luckily, there exists a straight-forward if well-hidden workaround that allows you to configure both download statistics and mirrors in the repositories’ metadata.