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 (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...)
 
m
Line 5: Line 5:
 
Required Downloads and Installations for CouchDB Setup
 
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 [http://www.couchbase.com/downloads/couchbase-single-server/community couchbase.org]. Download the ''Couchbase Single Server Community Edition 1.1+ '' (which is an Apache CouchDB 1.0+) for your platform.
+
# 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.
#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:
#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 [http://vandyk.st.informatik.tu-darmstadt.de/updates/students/th/andreas-android/org.eclipse.recommenders.udc.repository/target/site/ update site] using your Eclipse update manager. The latter client is needed to export data to your local server
+
## Point your Eclipse Update Manager to http://download.eclipse.org/recommenders/updates/head/ and install the following features:
#Download Code Recommenders' generators and place it in $SERVER_HOME.
+
## Intelligent Code Completion
 
+
## Self-hosting Platform
 
+
## Extdocs Client
 
+
# After installation:
Starting the System
+
## 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"
#Start your CouchDB using the standard port (i.e., 5984)
+
# Restart Eclipse:
#Start your server by executing the eclipse binary hosted somewhere below $SERVER_HOME
+
# tbd
#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:
+
<pre>#&gt; java -cp generators.jar generate_model_specifications --in http://localhost:5984/udc/
+
</pre>
+
#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
+
<pre>#&gt; java -cp generators.jar generate_call_models --in http://localhost:5984/udc/ --out models/calls/ --force
+
</pre>
+
#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:
+
<pre>#&gt; java -cp generators.jar generate_extdocs --in http://localhost:5984/udc/ --out http://localhost:5984/extdoc/
+
</pre>
+
#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.
+
#Done.
+

Revision as of 03:40, 23 September 2011

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 (which is an Apache CouchDB 1.0+) for your platform.
  2. Install Eclipse Code Recommenders Plug-ins in your IDE:
    1. Point your Eclipse Update Manager to http://download.eclipse.org/recommenders/updates/head/ and install the following features:
    2. Intelligent Code Completion
    3. Self-hosting Platform
    4. Extdocs Client
  3. After installation:
    1. 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/)
    2. Edit ${eclipse.home}/configuration/config.ini add the line "logback.configurationFile=logback.xml"
  4. Restart Eclipse:
  5. tbd

Back to the top