Skip to main content

Notice: This Wiki is now read only and edits are no longer 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
m
Line 1: Line 1:
This page describes how developers can setup Code Recommenders for their developer machines.  
+
This page describes how to setup Code Recommenders for a local developer machine.
  
 +
== Expert Guide ==
 +
If you know how things work internally, this expert guide is for you. There are five steps to follow:
  
 +
# [Server] Start the latest CouchDB on localhost:5984
 +
# [Eclipse] Install Code Recommenders Plug-ins
 +
# [Eclipse] Upload usage data
 +
# [Server] Generate Models
 +
# [Eclipse] Upate Models and run code completion...
  
Required Downloads and Installations for CouchDB Setup
+
== Beginners Guide ==
  
# Download and install Apache CouchDB 1.0+. For Linux, your distributor may offer an appropriate bundle. For Mac, Windows, and Linux, precompiled packages can be downloaded from [http://www.couchbase.org/get/couchbase-single/2.0 couchbase.org]. Download the ''Couchbase *Single Server* Community Edition'' (which is an Apache CouchDB 1.0+) for your platform (the zip contains the Mac version).
+
=== Installing CouchDB ===
# Install Eclipse Code Recommenders Plug-ins in your IDE:
+
For self-hosting Eclipse Code Recommenders a local [http://couchdb.apache.org/ 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 [http://www.couchbase.org/get/couchbase-single/2.0 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.
## Point your Eclipse Update Manager to http://download.eclipse.org/recommenders/updates/head/ and install the following features:
+
 
## Intelligent Code Completion
+
=== Installing Code Recommenders Self-Hosting Platform ===
## 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/.
## Extdocs Client
+
 
# After installation:
+
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''.
## Copy ${eclipse.home}/plugins/org.eclipse.recommenders.server.setup/logback.xml to ${eclipse.home} (Note, on Mac, the files needs to be copied to Eclipse.App/MacOs/Contents/)
+
 
## Edit ${eclipse.home}/configuration/config.ini add the line "logback.configurationFile=logback.xml"
+
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
# Restart Eclipse:
+
 
# tbd
+
* Usage Data Collector: http://localhost:29750/udc/
 +
* Codesearch: http://localhost:29750/codesearch/
 +
* Extdoc: http://localhost:5985/extdoc/
 +
 
 +
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 ===
 +
 
 +
# Go to Preferences >> Code Recommenders >> Dependencies and click on "update all models". This initially registers all known jar files in the server.
 +
 
 +
Next :
 +
 
 +
# Add Recommenders Nature to selected projects in your workspace.
 +
# Wait for Workspace build to complete.
 +
# Export the compilation units via Compilation Unit Export Wizard
 +
# Click on Model Generation in "Minimal Self-hosting Management View"
 +
# Wait until generation job completed.
 +
# 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...

Revision as of 07:55, 23 September 2011

This page describes how to setup Code Recommenders for a local developer machine.

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