---
url: /howto/integrating-with-your-ide/eclipse.md
---

# Teamscale Integration for Eclipse

Teamscale integrates with [Eclipse][eclipse], including dedicated support for the [ABAP Development Tools for Eclipse][adt]
Before installing the *Teamscale Integration for Eclipse*, make sure its [system requirements](../../../reference/system-requirements/#system-requirements-for-ide-plugins) are met.

\[\[toc]]

## Installing the Plug-in

Depending on your needs, there are several options to install the *Teamscale Integration for Eclipse*.

### Installing the Latest Version From the Eclipse Marketplace (recommended)

For most users, installing the **latest version** of the plug-in from the [Eclipse Marketplace](https://marketplace.eclipse.org/content/teamscale-integration-eclipse) is recommended.

1. Open the [*Teamscale Integration for Eclipse* solution page](https://marketplace.eclipse.org/content/teamscale-eclipse-plugin) at the Eclipse Marketplace.
2. Drag the *Install* button from the solution page onto your running Eclipse workspace.
   This opens the installation wizard.
3. Follow the instructions of the installation wizard
4. Restart Eclipse when prompted.

### Installing Any Version From the CQSE Website

Unlike the Eclipse Marketplace, the CQSE website offers both the **latest version** and **older versions** of the plug-in.

1. Select *Help* > *Install New Software...* from the Eclipse menu bar.

2. Enter a *Work with* location.

   * **Latest Stable Version:** `https://downloads.teamscale.com/ide/eclipse/latest/`
   * **Nightly Build:** `https://downloads.teamscale.com/ide/eclipse/nightly/`
   * **Older Version:** `https://downloads.teamscale.com/ide/eclipse/vM.N.x/` (replacing `M.N` by the feature version you need but keeping the `.x`, e.g., `7.8.x`)

   *Nightly builds are unreleased builds toward the next version and may be unstable.*

3. Select *Teamscale Integration for Eclipse* and any optional features you want.

4. Click *Next* and follow the instructions of the installation wizard.

5. Restart Eclipse when prompted.

### Installing While Offline

In case you cannot reach the Eclipse Marketplace or CQSE Website during the installation, e.g., due to a security policy, you can perform an offline installation.

1. Download an archive of the update site from the CQSE website:
2. Transfer the downloaded archive to your offline computer.
3. Select *Help* > *Install New Software...* from the Eclipse menu bar.
4. Click *Add* and the *Archive*.
5. Select the downloaded archive.
6. Select *Teamscale Integration for Eclipse* and any optional features you want.
7. Click *Next* and follow the instructions of the installation wizard.
   (If this step fails, see the [troubleshooting guide](../../../troubleshooting/#cannot-install-eclipse-integration).)
8. Restart Eclipse when prompted.

:::tip Installing on the Command Line
You can perform the offline installation on the command line as well.

1. Unzip the downloaded archive.
2. Use the Eclipse [p2 director](http://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html) to install.
   ```bash
   eclipse -nosplash -application org.eclipse.equinox.p2.director -repository file:///path/to/teamscale-eclipse-update-site -installIU com.teamscale.ide
   ```
3. (If you ever need to uninstall the plug-in, you can use the p2 director as well.)
   ```bash
   eclipse -nosplash -application org.eclipse.equinox.p2.director -uninstallIU com.teamscale.ide
   ```

:::

:::warning Don't Use Eclipse's Dropins Mechanism
With the [dropins](https://wiki.eclipse.org/Equinox/p2/Getting_Started#Dropins) folder, Eclipse provides another way of installing plug-ins.
We (and the Eclipse team) discourage using it for installing plug-ins unless you absolutely need to.
You won't get error messages with the dropins mechanism as you would with the p2 director, e.g., in case of missing dependencies.
:::

## Connecting to Teamscale

After installing the plug-in, you need to perform the following actions to configure a Teamscale server:

1. Open the Eclipse preferences dialog, navigate to the Teamscale settings (*Window* > *Preferences...* > *Teamscale*) and click on *Add*
2. Enter a descriptive name and the URL of the Teamscale server
3. Enter your *Username* and [*Access Key*](../../../glossary/#access-key)
   ![Eclipse Server Settings](./eclipse-preferences.png)
4. Test the connection by clicking on *Validate*.
5. Close the dialog by pressing *OK*.

### Configuring Using `.teamscale.toml` Files

In addition to connecting to a Teamscale server, the local Eclipse projects need to be mapped to projects on the Teamscale server.
Since Teamscale 9.9, this is done using one or more `.teamscale.toml` configuration files in a simple, uniform [file format (`.teamscale.toml`)](../../../reference/teamscale-toml/).

The only exception are ABAP projects, which are still configured using the ABAP projects' *Properties*.

### Configuring ABAP Projects Using Project Properties

1. Open the project properties by right-clicking on the project and selecting *Properties*.
2. On the left menu, switch to the *Teamscale* entry.
3. Click on *Enable Teamscale for this project* and select the appropriate server.
4. Specify the time in seconds (default: 60) the plugin waits for a successful update of relevant Teamscale projects.
5. Press *Apply and Close* to save the project properties.
   ![Teamscale Project Properties in Eclipse](./project-settings-cqi.png)

## Performing Pre-Commit Analysis

The Eclipse plug-in can be used to analyze changes prior to committing them to the repository.
This functionality is called pre-commit analysis.
The findings of these pre-commits are shown as any other finding in the *Findings* tool window.
The *Automatic Pre-Commit Analysis* option under the Teamscale tab must be enabled:
![Teamscale Pre-Commit](./eclipse-precommit3.png)

The pre-commit analysis is started automatically when you do one of the following actions:

* Open a file in the editor
* Switch to an already open file in the editor
* Save the file currently active editor
* Save all open files
* Activate ABAP code

Under the hood, Teamscale treats these changes as a commit on a new, virtual branch: your pre-commit branch.
Eclipse will poll the Teamscale server until analysis of this commit is done.
Once analysis is finished, Teamscale will show the findings from your pre-commit branch.

Note that, by default, the Teamscale server enforces some limits on the pre-commit branch w.r.t. the number of files that may be included in each pre-commit.
These limits exist so that one overly large pre-commit upload does not disproportionately delay analysis of other commits.
More information is [available here](../../../reference/admin-settings/server-limits/#pre-commit-limits) .

[eclipse]: https://eclipseide.org/

[adt]: https://tools.hana.ondemand.com/#abap
