Codetrails Connect | Getting Started

Whether you are using the Private Edition or Community Edition of Codetrails Connect, setting up Codetrails Connect is always the same, simple 3-step process:

Setup

Step 1: Installation

First, make sure that you have the latest version of Eclipse installed. Then go to Help > Eclipse Marketplace, search for Codetrails, and install Codetrails Connect, Community Edition. (You can upgrade to the Private Edition anytime).

Alternatively, you can install Connect from our update site, or simply drag and drop the following icon into your Eclipse workspace:

In either case, simply follow the on-screen instructions to complete the installation.

If you like, you can also install some experimental features fresh from the Codetrails Labs, like Codetrails Connect Snippets.

Step 2: Enable Intelligent Java Proposals for Content Assist

To get the most out of Codetrails Connect’s crowd-sourced code completion, we suggest that you make Eclipse Code Recommender’s Intelligent Java Proposals your default code completion engine. To do so, you just need to trigger code completion. You will then be asked whether you want to enable intelligent code completion.

Enable intelligent code completion

Just hit Enter and you are done; both Eclipse Code Recommenders and Codetrails Connect have been activated.

Step 3: Configure the data you want to share

Go to the Codetrails > Sharing preference page to configure what data you want to share with others, be they your teammates or the developer community at large.

Community Edition

If you are using the free Community server, we suggest that you share data about the Open Source projects you use (a few of which are pre-configured). You may also (voluntarily) send your e-mail address along with your completion data. (Don’t worry: It won’t be shared with others.)

The “Codetrails Connect > Sharing” preference page showing the settings for the Community server

Private Team

If you are part of a Private Team, you will need to enter both a valid e-mail address and a team token, which you should request from your administrotor. Data is shared only among users who have access to your team token, e.g., by you and your teammates. When using a Private Team server, we suggest that you Share data for all packages, so that your team gets them most out of the statistics gathered on its own Private Team server.

The “Codetrails Connect > Sharing” preference page showing the settings for the Private Team server

That’s it. You now have a crowd-sourced code completion that learns from both your code and others’.

Completion Engines

Codetrails Connects adds several completion engines to Eclipse’s Content Assist (also known as code completion), each of which makes your code completion just a bit smarter.

Hippie Call Completion

Eclipse’ standard Java code completion always presents you a list of all accessible methods you may call on an instance – and this is often way more than you want to see. With Codetrails Connect Hippie Completion, proposals additionally display information about which method you are likely to call. You can configure Hippie Completion to rank the most relevant proposals on top, the irrelevant proposals below and to help you to quickly spot the relevant methods for your task at hand.

Hippie completion works on static methods as well, helping you to pick the right proposal from an often long list of static methods.

Hippie Constructor Completion

Similar to learning relevant method calls, Hippie Completion learns which constructors you called when creating an instance. Noteworthy about constructor completion is that Hippie Completion learns likely completion scenarios even when subtypes of a completion are selected. For instance, when completing an assignment to the abstract class List<?>, it learns that the assigment is frequently completed with new ArrayList<>(). This is then presented above all other Eclipse-generated proposals.

Hippie Override Completion

Hippie Completion learns which methods you have overriden using code completion. Since this is learned on a per-supertype basis, Hippie Completion shows you which methods you most likely need to override for the given supertype.

Verb-based Call Completion

If you have installed the experimental Verb-based Call Completion engine, it will propose methods to you based on you current intent, as inferred by the verb of the surrounding method’s lowerCamelCase name.

Preferences

While the above is everything you need to get started, there are a few more options available to customize your Codetrails Connect experience.

Codetrails Connect > Hippie

On the Codetrails Connect > Hippie preference page you can …

  • change the maximum number of promoted proposals, i.e., the number of proposals whose relevance receives a boost based upon the gathered usage statistics,
  • choose how the relevance information is presented to you (current options include percentages, fractions, or a heat map (the default).

The “Codetrails Connect > Hippie” preference page

Hippie completion comes with three relevance indicators styles:

Percentage Relevance Indicators

By default, proposal relevances are given in percentage values behind the proposal's display string.
Percentage Relevance Indicator

Heatmap Relevance Indicators

In addition to the absolute proposal relevance, every proposal's relevance is highlighted by a configurable heat map color scheme.
Heatmap Relevance Indicator

Absolute Relevance Indicators

The first number shows how often a proposal was applied; the second number shows the absolute number of completion events Codetrails Connect has stored for the given type.
Absolute Relevance Indicator

Codetrails Connect > Calls

If you have installed the experimental Verb-based Call Completion engine, you can configure it on the Codetrails Connect > Calls preference page. You can …

  • choose how many proposals the completion engine should make and whether their relevance should receives a boost,
  • choose whether the proposals should be decorated with a small icon,
  • choose whether the proposals should be decorated with one of three adjectives (often, sometimes, seldom), based on configurable thresholds.

The “Codetrails Connect > Calls” preference page