# Teamscale Integration for Eclipse
Before installing the Teamscale Integration for Eclipse, make sure its system requirements are met.
# Download & Installation
The Eclipse plug-in for Teamscale is available in the Eclipse Marketplace. The page also states the currently supported versions of Eclipse. To install the plug-in, drag the Install button on the marketplace page to your running Eclipse workspace. Then simply follow the instructions of the installation wizard and restart Eclipse when prompted.
Alternatively and in case the marketplace cannot be used, e.g., due to restricted Internet connectivity, the update site is available as an archive.
Install using Help > Install New Software
# 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.
# 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 or Subclipse) 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 Fetch Pre-Commit Results 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 .