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

Difference between revisions of "Recommenders/SelfHosting"

m
Line 1: Line 1:
This page describes how to setup Code Recommenders '''Server''' on a local developer machine.
+
This page describes how to setup Code Recommenders '''Team Server''' inside a developer's Eclipse installation. If you want to run the '''Team Server''' stand-alone, contact us here: http://eclipse.org/forums/eclipse.recommenders/.
  
 
== Expert Guide ==
 
== Expert Guide ==

Revision as of 08:12, 23 September 2011

This page describes how to setup Code Recommenders Team Server inside a developer's Eclipse installation. If you want to run the Team Server stand-alone, contact us here: http://eclipse.org/forums/eclipse.recommenders/.

Expert Guide

If you know how things work internally, this expert guide is for you. There are five steps to follow:

  1. [Server] Start the latest CouchDB on localhost:5984
  2. [Eclipse] Install Code Recommenders Plug-ins
  3. [Eclipse] Upload usage data
  4. [Server] Generate Models
  5. [Eclipse] Upate Models and run code completion...

Beginners Guide

Installing CouchDB

For self-hosting Eclipse Code Recommenders a local Apache CouchDB installation is required. Code Recommenders runs with CouchDB 1.0+. Since CouchDB does not offer ready-to-use packages, we recommend to install precompiled packages from couchbase.org. Please download the Couchbase *Single Server* Community Edition (which is an Apache CouchDB 1.0+) for your platform (the zip contains the Mac version). Follow the install instructions of your installer and start CouchDB.

Installing Code Recommenders Self-Hosting Platform

The self-hosting platform basically runs the Code Recommender sevices such as recommendation models generation and delivery, extdocs, and codesearch in your local Eclipse installation. It stores it's data in the local CouchDB and into ${eclipse.home}/recommenders/ folder per default. Note, under Mac the local file path is ${eclipse.home}/Eclipse.app/Contents/MacOS/recommenders/.

To install the self-hosting platform, point your Eclipse Update Manager to http://download.eclipse.org/recommenders/updates/head/ and install the Self-hosting Platform Feature. If you haven't installed any other Code Recommender's plug-ins before, you should take this opportunity and install the Intelligent Code Completion, Extdocs Client, Subwords Completion, and Code-search Client.

After installation completed and Eclipse was restarted, you have to configure your Eclipse clients to use local urls instead of the remote ones. Therefore, got to Preferences >> Code Recommenders and change the URLs on the following sub-pages

Next, open the "Minimal Self-hosting Management View". There, press the Initialize CouchDB button. Your Server is now ready for work. Please note: Although the self-hosting platform runs inside your Eclipse installation, it's completely separated from your workspace! It needs to be feed with data before it can generate recommendation models as if it would run as an external server hosted somewhere on the internet.

Preparing for Data Upload

  1. Go to Preferences >> Code Recommenders >> Dependencies and click on "update all models". This initially registers all known jar files in the server.

Next :

  1. Add Recommenders Nature to selected projects in your workspace.
  2. Wait for Workspace build to complete.
  3. Export the compilation units via Compilation Unit Export Wizard
  4. Click on Model Generation in "Minimal Self-hosting Management View"
  5. Wait until generation job completed.
  6. go to Preferences >> Code Recommenders >> Dependencies and press Update all models.

That's it. By clicking on the update button again, all models generated on the server are now "downloaded" and registered in your local workspace. Let's start hacking...

Back to the top