# Teamscale Integration for Eclipse
Before installing the Teamscale Integration for Eclipse, make sure its system requirements are met.
# 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 (opens new window) is recommended.
- Open the Teamscale Integration for Eclipse solution page (opens new window) at the Eclipse Marketplace.
- Drag the Install button from the solution page onto your running Eclipse workspace. This opens the installation wizard.
- Follow the instructions of the installation wizard
- 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.
- Select Help > Install New Software... from the Eclipse menu bar.
- Enter a Work with location.
- Latest Version:
https://www.cqse.eu/download/teamscale/ide/eclipse/latest/
- Older Version:
https://www.cqse.eu/download/teamscale/ide/eclipse/vM.N.x/
(replacingM.N
by the feature version you need but keeping the.x
, e.g.,7.8.x
)
- Latest Version:
- Select Teamscale Integration for Eclipse and any optional features you want.
- Click Next and follow the instructions of the installation wizard.
- 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.
- Download an archive of the update site from the CQSE website.
- Latest Version:
https://www.cqse.eu/download/teamscale/ide/eclipse/latest/teamscale-eclipse-update-site.zip
(opens new window) - Specific Version:
https://www.cqse.eu/download/teamscale/ide/eclipse/vM.N.x/teamscale-eclipse-update-site.zip
(replacingM.N
by the feature version you need but keeping the.x
, e.g.,7.8.x
)
- Latest Version:
- Transfer the downloaded archive to your offline computer.
- Select Help > Install New Software... from the Eclipse menu bar.
- Click Add and the Archive.
- Select the downloaded archive.
- Select Teamscale Integration for Eclipse and any optional features you want.
- Click Next and follow the instructions of the installation wizard.
- Restart Eclipse when prompted.
Installing on the Command Line
You can perform the offline installation on the command line as well.
- Unzip the downloaded archive.
- Use the Eclipse p2 director (opens new window) to install.
eclipse -nosplash -application org.eclipse.equinox.p2.director -repository file:///path/to/teamscale-eclipse-update-site -installIU com.teamscale.ide
- (If you ever need to uninstall the plug-in, you can use the p2 director as well.)
eclipse -nosplash -application org.eclipse.equinox.p2.director -uninstallIU com.teamscale.ide
Don't Use Eclipse's Dropins Mechanism
With the dropins (opens new window) 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 can configure a Teamscale server via the following steps:
- Open the Eclipse preferences dialog, navigate to the Teamscale settings (Window > Preferences... > Teamscale) and click on Add
- Enter a descriptive name and the URL of the Teamscale server
- Enter your Username and IDE Access Key
- Test the connection by clicking on Validate.
- Close the dialog by pressing OK.
# Enabling the Plugin for Eclipse Project(s)
To connect an Eclipse project to Teamscale and obtain quality data such as findings, perform the following steps:
- Open the project properties by right-clicking on the project and selecting Properties.
- On the left side, switch to the Teamscale entry.
- Click on Enable Teamscale for this project and select the appropriate server.
- Click on Automatically configure Teamscale which will automatically identify the correct mapping to the code in Teamscale.
After connecting a project to Teamscale you can enable the display of findings in the menu bar via Teamscale > Load findings for open files.
# 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. Only the files changed since the last commit that is present on the Teamscale server are uploaded and analyzed by pre-commit analysis. To compute this delta, Teamscale connects to the version control system configured for the IDE projects. Currently, supported version-control systems are Git and Subversion (using Subversive (opens new window) or Subclipse (opens new window)) You can trigger the pre-commit analysis by selecting Teamscale > Upload Projects for Pre-Commit Analysis from the Eclipse main menu or via the shortcut »Ctrl+9«.
Eclipse reports the findings delta after a few seconds in a balloon as shown in this screenshot and in the Pre-Commit Results view:
The new findings are also shown in the complete findings list as shown on the left side in the screenshot, however, the Pre-Commit Results view allows you to focus on the new findings.
Under the hood, Teamscale handles the pre-commit upload as if it would be a new branch in the repository. After the upload, Teamscale shows findings from this virtual branch. To show findings from real repository branches again (e.g., after you switched to a different branch), disable the Show Findings from Pre-Commit Branch toggle in the Teamscale menu.
Note that, by default, Teamscale enforces some limits to such a pre-commit upload. These limits exist so that one overly large pre-commit upload does not disproportionately delay other analyses of other commits, whether pre-commits by other users or regular. For example, pre-commit only works if your local branch is not too far ahead of what your Teamscale server has already seen and analyzed. More information is available here .