Marco van Meegen
Senior IT-Consulting - J2EE Java Eclipse SQL ...and more


designelement missing
designelement missing
 
spacer missing
spacer missing
spacer missing
Checkclipse Plugin
Checkclipse integrates the famous Checkstyle Style and Coding Guideline Checker Checkstyle into the Eclipse Software Development Environment (Websphere Studio Application Developer is the IBM-product based on the eclipse platform).

It enables a fast start using preconfigured Style Files. If you already use Ant with Checkstyle, tell Checkclipse plugin where to find your checkstyle configuration file, and it will be used.

It is open source under MPL 1.1.

Valid HTML 4.01!

News

19-May-2006
Checkclipse 2.0.1 is out. Checkclipse 2.0.1 is considered to be beta-state, but internally we use it for quite a while now. It runs on Eclipse 3.0 or higher and was tested with 3.2RC1. Checkstyle was upgraded to 4.1.

06-May-2006
Checkclipse 2.0.0 is out. It mainly is a rewrite of the source code base to make it more readable and improve structure and was done by Ralf. Checkclipse 2.0.0 thus is considered to be beta-state, but internally we use it for quite a while now. It runs on Eclipse 3.1 or higher and was tested with 3.2RC1. If you need Eclipse 3.0 support, stick with the old version.


11-December-2005
Ralf Schandl has done a lot of work to improve Checkclipse; thus now we released Checkclipse V1.7.0, all improvements were done by him.

Thanks Ralf, great Work !!

It uses Checkstyle 4.0 and thus JDK 1.5 Support. Tested with Eclipse 3.0 and 3.1 final. If you have Eclipse 2.1, please use Checkclipse V1.4.0.

designimage

13-March-2005
Checkclipse V1.6.0 released. Tested with Eclipse 3.0 and 3.1 final. If you have Eclipse 2.1, please use Checkclipse V1.4.0. designimage

23-July-2004
Checkclipse V1.5.0 released. Tested with Eclipse 3.0 final release. If you have Eclipse 2.1, please use Checkcliopse V1.4.0; the new version does not support Eclipse 2.1. designimage

02-July-2004
The current Checkclipse release does not work with the Eclipse 3.0 final release. End of this month (latest) I'll release a new version for Eclipse 3.0. Please wait for the new version. designimage

14-May-2004
Checkclipse V1.4.0 released. Uses Checkstyle V3.4. Added optional check.jar. Bugfixes. See FAQ on adding own checks. designimage

25-Feb-2004
Checkclipse V1.3.0 released. Compatibility Version for Eclipse 3.0M7+. Fixes several problems with 3.0 Eclipse build. Still works for Eclipse 2.x stream. designimage

15-Aug-2003
Checkclipse v1.1.1 released. designimage

09-June-2003
Checkclipse v1.1.0 released. designimage

30-May-2003
Checkclipse v1.0.0 released. designimage

29-May-2003
Checkclipse v0.9 released. Support for Checkstyle 3.1, project-relative paths, improved team support. Download at Sourceforge: http://sourceforge.net/projects/checkclipse designimage

18-May-2003 Checkclipse Sourceforge-Project installed. designimage

Release Notes

see Release History in the online Help.

Goals

Checkclipse integrates the Checkstyle style checker for Coding Guidelines into Eclipse. While you develop, style violations are marked in the Workbench by Warning markers and Task entries. Fix them from the start !

  • check your code formatting (indentation, spaces, long lines)
  • watch for very long methods and long parameter lists
  • check for complete javadoc tags
  • watch identifier naming conventions for classes, parameters, members etc..

And if you don't like this stupid coding guideline, turn it off !

Features

  • makes it a snap to use your standard checkstyle files and share it with "official" ant builds.
  • 5-minute jump start by just installing and turning it on for your project. Stylish !
  • automatic builder which checks your java files as soon as you save
  • style violation markers are set in your files and in the task list
  • turn it on/off for each project separately
  • jump-start with preconfigured style configuration file
  • set your individual style configuration files in the preferences
  • override preference configuration for individual projects
  • integrates the newest Checkstyle Version
  • integrated Eclipse Help
  • works with Eclipse 2.x and 3.x (since Checkclipse V1.3.0, newest versions do not always support old Eclipse versions)
Quick Start

After you have installed Checkclipse into your Eclipse Workspace (unzip into Eclipse directory), restart your Workbench. Create a new Java Project or import an existing one.

In the Package Explorer View, select the project, right mouse click --> Properties. Select page "Checkclipse". Check the "Enable Checkstyle" checkbox. The page should look as follows:

Press Ok, a rebuild of your project should follow, checking all Java files (files with suffix .java) for style violations, adding warning markers to your files and the Problems View.

The style guidelines used are the ones delivered with Checkclipse. If you want to use different ones, read the help

If you specify a different configuration, make sure, it is a valid checkstyle configuration. Check the Eclipse log file for errors, if it does not seem to work or start checkstyle at the command line to verify that settings are correct.

If you want more, read the online-help.

Known Limitations and Bugs
  • if you change style file settings, you have to manually rebuild the whole projects. Since v1.0 you can set the autorebuild-flag, so for all settings changes a build is triggered automatically.
  • If you change the style configuration files themselves, you must either stop/start the Workbench or disable/enable checkstyle for each project to make changes effective
  • If you change project-specific checkstyle settings *ALWAYS* make sure, .checkstyle and .project are not write protected. Otherwise .checkstyle might get into an inconsistent state.
FAQ

Q: When enabling checkstyle in project properties, i get an error: "Problem writing file: could not load config file ... cause org/xml/sax/SAXException". What can I do ?

A: This might occur on some configurations. Insert the line <import plugin="org.apache.xerces"/> into the plugin.xml in the plugin directory.

Q: How can I use own Checks/Filters with Checkclipse ?

A: Find the Checkclipse plugin directory in your Eclipse installation; usually ${ECLIPSE_HOME}/plugins/de.mvmsoft.checkclipse_x.y.z. Copy your jar into the lib directory contained therein. Modify the plugin.xml file in the plugin directory to include your library in the path, e.g.

<?xml version="1.0" encoding="UTF-8"?>
< plugin id="de.mvmsoft.checkclipse" name="Checkclipse Style Checker" version="1.4.0" ...>
<runtime>
<library name="checkclipse.jar"/>
<library name="lib/checkstyle-all-3.4.jar"/>
<library name="lib/MyChecks.jar"/>
</runtime> ... </plugin>

Restart Eclipse. Add the new modules to your checkstyle-configuration xml file; e.g. <module name="my.package.MyCheckClassName"/>. Make sure that your new configuration file is used by setting it in your preferences/project settings. That's it.

Q: I get an error message "null ptr exception in Checker.normalize" if I set my configuration file in the preferences of Checkclipse.

A: This was a bug in Checklipse 1.3.0. Use 1.4.0 or set the xml configuration file in your project settings instead of workbench preferences.

Q: I get an error message: " Problem writing file: could not load packagename file ..." - Declared encoding "Cp1251" does not match actual one "UTF-8"; this might not be an error.

A: Make sure to use a suitable editor for the XML file; or change the encoding declared in the XML file to the given one or remove the encoding information. The XML file must be XML compliant.

Q: I want to use the "Header" check module to verify correct Java Headers. How can I do this with Checkclipse ?

A: There is a special variable called "$SAMEDIR" to reference the Header-File relative to the properties file. Thus you can do the following: include header-check in checkstyle-config file:

<module name="Header">
<property name="headerFile" value="${checkstyle.header.file}"/>
<property name="severity" value="info"/>
</module>

Choose a property file and define the checkstyle.header.file property as follows:

checkstyle.header.file=$SAMEDIR/java.header

Save a textfile containing the text which all Java Files should contain in the same directory as the properties file and name it java.header. That's it.

Q: I'd like to use Checkclipse with Eclipse 3.0. Is this possible ?

A: Yes. Checkclipse is tested on Eclipse 3.0 and 3.1 releases.

Q: When working offline, i cannot use Checkclipse as it attemps to get the dtd from the internet for validation.

A: Maybe the DTD version of your checkstyle file doesn't match the checkstyle version used by Checkclipse. Use a different one.

Future Plans
  • fix limitations mentioned above
  • find a way to disable checks at some specific location in a file
Pictures

In the Online Help, there are lots of pictures, here one of Checkclipse in Action:

designelement missing
spacer missing
©Copyright 2002-2011 Marco van Meegen All Rights Reserved
For more information feel free to Contact Me

Impressum und Disclaimer

spacer missing