Revision as of 16:21, 31 August 2011 by Bruch.st.informatik.tu-darmstadt.de (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...)
This page describes how developers can setup Code Recommenders for their developer machines.
Required Downloads and Installations for CouchDB Setup
- 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.
- Download the Code Recommenders server platform (BUILD TBD). Unzip the product. The newly created folder is referred to as $SERVER_HOME.
- 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
- Download Code Recommenders' generators and place it in $SERVER_HOME.
Starting the System
- Start your CouchDB using the standard port (i.e., 5984)
- Start your server by executing the eclipse binary hosted somewhere below $SERVER_HOME
- Run the CouchDB initialization scripts found in $SERVER_HOME/couchdb/*/setup.sh
- Start your Eclipse IDE and associate a bunch of Java projects with Code Recommenders nature.
- In Eclipse, go to Preferences»Code Recommenders»Usage Data Collector page, and change the webservice url to "http://localhost:29750/udc/"
- 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.
- After updating the models, execute the following command from $SERVER_HOME:
#> java -cp generators.jar generate_model_specifications --in http://localhost:5984/udc/
- 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.
- 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
- 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)
- 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/
- 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.