This is an old revision of the document!
Table of Contents
The Checkstyle Plugin for Eclipse
Checkstyle is a static analysis tool. The Checkstyle plugin for Eclipse enables the use of Checkstyle from within Eclipse .
Installation
The easiest way to install the Eclipse Checkstyle Plugin is as follows.
- Start a WWW browser and navigate to http://eclipse-cs.sourceforge.net/ .
- Start Eclipse.
- Drag the “Install” icon from the WWW browser into a running Eclipse workspace.
- When the dialog box appears, check “Checkstyle Plug-in” and click on Confirm.
- Check “I accept…” and click on Finish.
- If you get a message about “unsigned content”, click OK.
- Restart Eclipse.
Several alternative methods are discussed at the Checkstyle Plugin site .
Enabling the Checkstyle Plugin
To enable the Checkstyle plugin for a particular project:
- Right-click on the project.
- Click on Checkstyle and Activate Checkstyle. (Or, if there is no Checkstyle entry, click on Properties and then select “Checkstyle”, check “Checkstyle active…” and click on OK.)
Loading a Checks File
If your course uses a custom checks file:
- Download the file to an appropriate location on your local file system.
- In Eclipse, right-click on the project, and pull down to Properties.
- Select “Checkstyle” and click on the “Local Check Configurations” tab.
- Click on New.
- Select “External Configuration File”, enter a “Name:” and the “Location:” of the file, and click OK.
- Select the “Main” tab.
- Select the appropriate configuration file from the drop-down list.
- Click on OK.
- When the “Rebuild suggested” dialog appears, click on Yes.