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/SelfHosting

< Recommenders
Revision as of 16:21, 31 August 2011 by Bruch.st.informatik.tu-darmstadt.de (Talk | contribs) (New page: This page describes how developers can setup Code Recommenders for their developer machines. Required Downloads and Installations for CouchDB Setup #Download and install Apache CouchD...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page describes how developers can setup Code Recommenders for their developer machines.


Required Downloads and Installations for CouchDB Setup

  1. 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 couchbase.org. Download the Couchbase Single Server Community Edition 1.1+  (which is an Apache CouchDB 1.0+) for your platform.
  2. Download the Code Recommenders server platform (BUILD TBD). Unzip the product. The newly created folder is referred to as $SERVER_HOME.
  3. Install Eclipse Code Recommenders Plug-ins in your IDE: First, install the Code Recommenders' tool plug-ins from the Eclipse Marketplace. Second, install the usage data sharing plug-in from this update site using your Eclipse update manager. The latter client is needed to export data to your local server
  4. Download Code Recommenders' generators and place it in $SERVER_HOME.


Starting the System

  1. Start your CouchDB using the standard port (i.e., 5984)
  2. Start your server by executing the eclipse binary hosted somewhere below $SERVER_HOME
  3. Run the CouchDB initialization scripts found in $SERVER_HOME/couchdb/*/setup.sh
  4. Start your Eclipse IDE and associate a bunch of Java projects with Code Recommenders nature.
  5. In Eclipse, go to Preferences»Code Recommenders»Usage Data Collector pageand change the webservice url to "http://localhost:29750/udc/"
  6. In Eclipse, go to Preferences»Code Recommenders»Dependencies page, and click on update all models. There is nothing expected to happen since there are no models available on the server. But refreshing all models triggers an update request that makes the libraries in your workspace known to the server.
  7. After updating the models, execute the following command from $SERVER_HOME:
#> java -cp generators.jar generate_model_specifications --in http://localhost:5984/udc/
  1. Next, export the local usage data to your server by using the Export»Code Recommenders»Export Usage Data wizard. Follow the instructions and click on Finish on the last page. Your data now gets uploaded to your local server.
  2. Next, we have to generate the models. This is done by calling
#> java -cp generators.jar generate_call_models --in http://localhost:5984/udc/ --out models/calls/ --force
  1. Now, models have been created and are ready to use. In Eclipse, go to Preferences»Code Recommenders»Dependencies page, and click on update all models. After a few seconds, the new models are downloaded and locally installed in your workspace under $WORKSPACE_HOME/.metadata/.plugins/org.eclipse.recommenders.rcp.codecompletion.calls/models/ (check whether you can find your models here)
  2. Next, we can generate Extdocs subclassing directives for classes (yet only). To do so, call:
#> java -cp generators.jar generate_extdocs --in http://localhost:5984/udc/ --out http://localhost:5984/extdoc/
  1. After the generation task completed, point your cursor on one of your types you uploaded data for and check the Extdoc hover and/or Extdoc view.
  2. Done.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.