General Questions

How to get Code Recommenders to work with my company's code?

For every release, Code Recommenders analyzes more than 60 million lines of code to support you with recommendations for the Java Runtime Environment and more than 2,000 Eclipse APIs.

Now you can get the same power for your own codebases — and even more — with Ctrlflow Insights.

Learn more…

Eclipse Code Recommenders requires Eclipse 4.2 (aka Juno) or later. Download the latest release of Eclipse here.

Out of the box, Eclipse Code Recommenders provides intelligent code completion and augmented documentation for the Java Runtime Environment (java.*, javax.*) and most, if not all, APIs offered by the Eclipse foundation (org.eclipse.*). These recommendations are based on the usage patterns exhibited by code available publicly on the Eclipse Marketplace and have been compiled into so-called models through data-mining. You can see the list of available models in the Model Repositories view.

If the above message shows up in the Error Log, the most likely cause is a conflict with m2e 1.5, the Maven integration for Eclipse. (Other symptons are a missing Model Repositories view and the fact that the Intelligent Code Completion does not work.)

The workaround to this problem is to start Eclipse with the -clean command-line option. This is needed just once. See this bug for details.

If you work in a corporate setting or some other restrictive environment which prevents your IDE from downloading files from the Eclipse Foundation’s servers, you will have trouble accessing both the Code Recommenders update site and our model repositories. In the latter case, Code Recommenders will alert you to the problem with a Failed to Download Index dialog.

You can find instructions on how to work around this issue by downloading archives of our complete update site or model repository on our download page. This way, you will only need to access the Eclipse Foundation’s servers once; thereafter, you can work offline.

Eclipse Code Recommenders will automatically download the necessary recommendation models for the frameworks/APIs you use. To do so, it needs to connect to a model repository using HTTP or HTTPS. If you are behind a proxy, you may experience connection issues depending on your configuration (see the General > Network Connections preference page).

The following configurations are known to work:

  • HTTP or HTTPS proxy (optionally with username/password Basic authentication) as configured by the Manual proxy provider.
  • HTTP or HTTPS proxy with username/password Digest authentication as configured by the Manual proxy provider.
  • HTTP or HTTPS proxy without authentication as configured by the Native proxy provider.

The following configurations may not work in all circumstances, depending on the proxy’s vendor and version:

  • HTTP or HTTPS proxy with NTLM authentication. This works with Squid, but may not work with all implementations of NTLM by Microsoft. Please comment on this bug if you experience problems.

The following configurations do not work yet:

  • HTTP or HTTPS proxy with username/password authentication as configured by the Native proxy provider. See this bug for details.

The activation proposal is shown whenever Code Recommenders’ Intelligent Java Proposals and either JDT’s or Mylyn’s Java Proposals are in your default Content Assist list. To get the proposal back, go to the Java > Editor > Content Assist > Advanced preference page and select the checkbox for Java Proposals (Code Recommenders) in the upper table.

Alternatively, if you just want to enable Code Recommenders’ Intelligent Java Proposals, go to the Code Recommenders > Completions preference page and check the Enable Code Recommenders code completion checkbox. This automatically removes both JDT’s and Mylyn’s Java Proposals from the default Content Assist list and adds Code Recommenders’ Intelligent Java Proposals.

This is due to a known limitation of Eclipse's Java Development Tools (JDT) that do not make any recommendations at these locations without at least one character prefix. See this bug for details.

Timeouts are known to occur occasionally for constructor and type completions when subwords completion is enabled. If you experience such timeouts, please disable the comprehensive matching for these kinds of proposals on the Code Recommenders > Completions > Subwords preference page. Alternatively, you can disable subwords completion altogether by disabling the Subwords-Completion Processor on the Code Recommenders > Completions preference page.

Most likely the snippet is syntactically incorrect and does not conform to the JFace template-language syntax. Check Eclipse’s error log. It likely contains an error saying that the snippet could not be evaluated. The error message might give you an indication as to what the problem is.

There are many ways to contribute to Eclipse Code Recommenders:

If you have a question that has not been answered already, simply ask us directly. Click here to open a chat window to the bottom right and enter your question. Our support team will answer as soon as possible.