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

This page is intended as collection of really quick hints to try Code Recommenders in action. If you get stuck at any position or have any other problems please contact us.

Setup

Install the following plug-ins from these update sites:

 * Intelligent Code Completion
 * Codesearch Client
 * Extdoc Client
 * Naive Subwords Completion
 * DON'T install  JDT Callchain Completion ! Another, not JDT based engine is bundled with the Intelligent Code Completion feature.
 * Usage Data Collector Client (NOT server)
 * Download zip archive
 * In Eclipse choose File->Import->Existing Projects into Workspace and select the zip file. Import both projects to your workspace
 * The Android project requires to have an installed Android SDK and the corresponding eclipse ADT plugin (Don't forget to set the location of your SDK installation in the Android preferences).
 * Because of a bug you have to restart your workspace after importing the projects (is fixed now ;)


Custom models

Follow these steps to export your API usage data and generate a custom model based on that data.

  • Open the export wizard File->Export->Code Recommenders->API Usage Data
  • Select the projects containing usage data you want to export
  • On Library Selection page you can filter the exported data to only contain usages that use types of the selected libraries (Not considered in current state)
  • On Package Selection page you have the possibility to refine the project selection by filtering on package level
  • Depersonalisation page contains a checkbox which will remove identifiers in the exported data if set. You can see some example data in the preview on that page, showing what data will be shared. (Depersonalization not fully working in current state)
  • Select Export as Zip File and choose a target file of your choice.
  • Wait for the job to be done (job progress is shown in the Progress view as usual)
  • Download the jar file which generates the models from exported data from http://vandyk.st.informatik.tu-darmstadt.de/files/modelgeneration.jar
  • Generate your custom model with this command: java -jar modelgeneration.jar -in yourExportedData.zip -out someDirectory -generate
  • Go to your eclipse preferences and select the Dependencies page under category Code Recommenders
  • Set the generated model zip as model for any dependency you want by selecting the dependency first and then the "Select model file" button located in the "Matched model" section.
  • You can now try what code completion offers you by using code completion on types you exported usage data for
  • You can switch back to our models by clicking the "Reresolve model" button next to the "Select model file" button

Copyright © Eclipse Foundation, Inc. All Rights Reserved.