These instructions explain how to install the licensed version of CodeQL for Eclipse into an existing installation of Eclipse. You can use CodeQL for Eclipse to analyze CodeQL databases (previously known as "snapshots") of open source and closed source projects. If you don't have Eclipse installed already, see Installing CodeQL for Eclipse standalone.
This plugin is suitable for analyzing databases downloaded from LGTM Enterprise or created using command-line tools of the same version. If you also want to analyze databases downloaded from LGTM.com, you need to install the new CodeQL extension for Visual Studio Code, see the Visual Studio Code marketplace. For more information on database compatibility, see Database compatibility.
Before you can install and configure CodeQL for Eclipse, you need:
- Eclipse version 4.3 or later. You can download Eclipse from https://www.eclipse.org/downloads.
- Eclipse configured to use Java 8 JRE or later, excluding versions 11.0.0–11.0.2. See the Eclipse wiki for details of how to configure this.
Installing the plugin using an update site
We recommend that you install the CodeQL for Eclipse plugin using an update site. This makes it easy to check for updates to the plugin using the Help > Check for Updates option.
- Start Eclipse.
- Click Help > Install New Software.
- Click Add next to the list of update sites to display the Add Repository dialog box.
- In the Name text box, type
CodeQL for Eclipse.
In the Location text box, type the URL for the CodeQL for Eclipse update site. For your company's URL, contact your organization's system administrator. Alternatively, download an archive of the update site,
ql-for-eclipse-x.xx.x.zip, from GitHub: https://github.com/Semmle/eclipse-codeql-binaries/releases and follow the steps at the bottom of this page.
- When you have finished defining the Name and Location, click OK.
- Expand Semmle Products and select the components that you want to install:
- CodeQL for Eclipse—contains the core functionality of the plugin.
- CodeQL for Eclipse Graph/Treemap Visualization and Reporting—optional, provides additional visualizations.
- CodeQL for Eclipse Language Libraries—allows you to write queries for the specified language.
- CodeQL for Eclipse License—contains the license agreement for the software.
- Click Next to display a summary of the software to be installed.
- Click Next to display the license conditions.
- When you are ready to accept the license agreement and install the software, click Finish.
- When the installation finishes, you are prompted to restart Eclipse to complete the process. We recommend that you click Restart Now unless you need to save some changes before restarting Eclipse.
When Eclipse restarts, you're ready to use CodeQL for Eclipse.
Alternatively, you can install the plugin using a local archive. To do this, use the above instructions with steps 4 and 5 modified as follows:
- Click the Archive button and select the zip archive that you would like to use. Click OK.
- When the archive path is displayed in the Location box, click OK.