This topic describes how to install the Polyspace as You Code plugin in Eclipse™. For Polyspace desktop products such as Polyspace Bug Finder, see the topic "Polyspace Analysis in Eclipse" in the Polyspace® Bug Finder™ documentation.
The Polyspace as You Code plugin in the Eclipse IDE allows you to run Polyspace on the file that you are currently viewing and see analysis results such as bugs and coding standard violations. You must install Polyspace as You Code separately to run the analysis. The plugin allows you to point to this installation from Eclipse and show results produced by the Polyspace analysis.
Note
If you install the Polyspace as You Code Eclipse plugin on Linux, see Configure Eclipse for Supported Java Version on Linux.
You can install the plugin in one of two ways:
While installing the Polyspace as You Code analysis engine using the installer that you download from Polyspace Access on the web.
After installing the Polyspace as You Code analysis engine.
To install the Polyspace as You Code plugin, use the contents of the folder provided with your installation. polyspaceroot\polyspace\plugin\eclipse is the Polyspace as You Code installation folder, for instance, polyspacerootC:\Program Files\Polyspace as You Code.
The rest of this topic describes the second approach where you install the plugin separately from installing the Polyspace as You Code analysis engine.
To install the plugin interactively:
In the Eclipse IDE, select Help > Install New Software.
In the Install window, click Add, and then click Local in the Add Repository popup.

Navigate to the folder and click Select Folder, then add the folder to the repository.polyspaceroot\polyspace\plugin\eclipse
Make sure that the Polyspace plugin is selected, then click Next and follow the prompts to complete the installation.

To uninstall the plugin, go to Help > About Eclipse IDE. In the About Eclipse IDE window, click Installation Details, select the Polyspace plugin on the Installed Software tab, and then click Uninstall and follow the prompts.
To install the plugin, open a terminal and navigate to your Eclipse installation folder, for instance C:\Program Files\eclipse, and enter:
eclipsec.exe -application org.eclipse.equinox.p2.director ^ -repository file:"/polyspaceroot/polyspace/plugin/eclipse/" ^ -installIU com.polyspace.eclipse.feature -nosplash
polyspaceroot is the Polyspace as You Code installation folder, for instance, C:/Program Files/Polyspace as You Code. The -repository path must be specified with forward slashes "/".To uninstall the plugin, enter:
eclipsec.exe -application org.eclipse.equinox.p2.director ^ -uninstallIU com.polyspace.eclipse.feature -nosplash
The Polyspace as You Code Eclipse plugin does not support Java versions 13 and later. If your Eclipse IDE uses an unsupported Java version, you see an error message when you start the IDE.
To configure your IDE to use a supported Java version:
Go to https://jdk.java.net/archive, download the OpenJDK version 12 GA (build 12+33) for Linux, and then right-click the downloaded TAR file to extract its content.
Alternatively, at the command line, enter these commands:
wget https://download.java.net/java/GA/jdk12/33/GPL/openjdk-12_linux-x64_bin.tar.gz
tar xzvf openjdk-12_linux-x64_bin.tar.gzOpen file
in a text editor and replace the path below the eclipseRoot/eclipse.ini-vm
line with the path to the bin folder for the openJDK
installation that you downloaded in step 1. The
eclipseRoot folder is your Eclipse IDE
installation folder.
For example, if you extracted the download from step 1 into folder
/local/tools, the section of your
eclipse.ini file around the
-vm line looks similar to this
section:
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/local/tools/jdk-12/bin
Restart your IDE to apply the changes.