General C and C++ Java Third-Party External

CodeSonar Plug-in for Eclipse

The CodeSonar plug-in for Eclipse allows users to build and analyze CodeSonar projects and examine analysis results from within Eclipse.



Overview

The CodeSonar plug-in for Eclipse allows users to build and analyze CodeSonar projects and examine analysis results from within Eclipse.

To install the plug-in, follow the instructions in CodeSonar Plug-in for Eclipse: Setting Up.

Once installed, the CodeSonar plug-in can be selectively enabled on a project-by-project basis.

For a guided introduction, see the Eclipse Plug-in Tutorial.

Terminology

We use the following terminology.

analysis mode Every project has an associated CodeSonar analysis mode.
  • Hook mode: for building and analyzing the (C, C++, or Java) project with CodeSonar, then examining the analysis results.
  • Import mode: for examining analysis results that have been imported from a hub.

There are two ways to change analysis mode for a project:

  • select your preferred analysis mode from the CodeSonar > Enable >... submenu, or
  • open the project properties dialog, select your preferred analysis mode, click Apply, then click OK.
current analysis The current analysis depends on the analysis mode.
  • Hook mode: the current analysis is the most recent analysis performed by the CodeSonar plug-in for your Eclipse installation since you switched to Hook mode.
    If you have not analyzed the project since switching to Hook mode, there is no current analysis.
  • Import mode: the current analysis is the analysis you most recently imported.

Hook Mode Requirements

To use the plug-in in hook mode, the Eclipse project must meet the following Builder requirements.

C/C++ The Builder type for the Eclipse project must be External builder.
  • We recommend using the "GNU Make Builder"
  • Internal builders are not suitable for use with the plug-in's hook mode. In particular, it will not work with the "CDT Internal Builder".
  • For more builder information, see the Eclipse C/C++ Development User Guide: Defining Project Build settings.
Java The Builder for the Eclipse project must be Java builder (from JDT).
  • Other Java-related builders, such as the "Gradle Project Builder", are not suitable for use with the plug-in's hook mode.

These requirements do not apply to import mode.

Eclipse Plug-in Links

The following sections provide detailed information about installing and using the CodeSonar plug-in for Eclipse.