Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Recommenders/BuildingFromSource

< Recommenders
Revision as of 02:39, 3 July 2013 by Marcel.bruch.gmail.com (Talk | contribs) (Build Prerequisites)

Building Eclipse Code Recommenders from sources should be pretty easy. If some of the steps below fail - let us know.

Build Prerequisites

On your development machine, you should have installed/use:

  • Eclipse 4.3+:
    • Plug-in Developer package (you need the plugin development environment)
    • Xtend 2.4+ Plug-ins
  • command line:
    • Maven 3.0+

Building with Maven Tycho

$ git clone http://git.eclipse.org/gitroot/recommenders/org.eclipse.recommenders.git
$ cd org.eclipse.recommenders
$ mvn clean install -P e43

Building from Eclipse Workspace

Configuring Eclipse Code Recommenders Workspace for Eclipse is slightly more complicated:

On command line do:

$ git clone http://git.eclipse.org/gitroot/recommenders/org.eclipse.recommenders.git

Then,

  1. Import all projects into your Eclipse workspace.
  2. Set workspace encoding to UTF-8.
  3. Set the workspace's target platform:
    1. Go to /targets/e43/
    2. Open 'e43.target' target definition with target platform editor.
    3. Wait until Eclipse resolved all dependencies. Check the progress view to see when resolving finished.
    4. Now click on the 'Set as target platform' link on the upper right corner of the editor.
  4. Wait until workspace is rebuild and all compile errors went away (maybe except from a few projects)
  5. In the case you see error markers on the projects saying Execution environment references were not checked for 'project-name' because no environment descriptions are installed. your Eclipse installation is missing an Execution Environment Description (EED) for Java 1.6. See this page how to install and use EEDs.
  6. Done. Start a new Eclipse runtime via the product configuration file located under /etc/eclipse/ide.product
  7. Remove API Baseline. If you want remove alle errors from the problems view, you have to disable the API Baseline: open the preferences, go to API Baselines and set "Missing API baseline" to ignore.

Troubleshooting

If anything does not work as expected, report it to http://eclipse.org/forums/eclipse.recommenders. We are glad to lend a hand to get the build working for you.

"IRecommendersCompletionContextFactory already configured" when starting Recommenders in Eclipse runtime

If you experience the exception below, please ensure that the project org.eclipse.recommenders.completion.rcp.e37 is closed. We have two fragments that contain specific code for Eclipse 3.7 and Eclipse 4.2/3.8. Having both installed causes this exception.


!ENTRY org.eclipse.jdt.ui 4 0 2012-05-19 17:46:07.306
!MESSAGE The 'Code Recommenders: Call Chain Proposal Computer' proposal computer from the 'org.eclipse.recommenders.completion.rcp.chain' plug-in did not complete normally. Unable to instantiate the extension.
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in "org.eclipse.recommenders.completion.rcp.chain" was unable to instantiate class "org.eclipse.recommenders.injection.ExtensionFactory".
   ...
Caused by: com.google.inject.CreationException: Guice creation errors:

1) A binding to org.eclipse.recommenders.completion.rcp.IRecommendersCompletionContextFactory was already configured at com.google.inject.assistedinject.FactoryModuleBuilder$1.configure(FactoryModuleBuilder.java:335).
 at com.google.inject.assistedinject.FactoryModuleBuilder$1.configure(FactoryModuleBuilder.java:335)
...

For Extenders of Code Recommenders

First, an extender is someone who adds new plug-ins to code recommenders that may or may not use (but not manipulate) existing code of Code Recommenders. In order to reuse our code base, there is a special target platform that contains all dependencies as well as all bundles from the head/e42 update site. The file can be found in etc/targets/e42-extender.target.

To use this target platform definition, just load the target file (via "Open External File"), and set the target platform by clicking on the link on the upper right. There should be no need to import any of code recommenders plug-ins in your workspace.


Additional Notes

After setting the target platform, there will be several projects projects which will still contain compile errors. *.fixture* projects contain test scenarios for code completion and don't compile "per construction". Some test and plug-in projects (e.g., codesearch.rcp, udc.rcp, and completion.rcp.templates) haven't been migrated to the latest e4.2 infrastructure yet. But you shouldn't care too much about them.

Back to the top