JBuilder Opentools

Checkstyle4JBuilder

Installation

Installation is the same as for jbCheckstyle, the instructions for which are reproduced below.


Copy jbcheckstyle.jar to lib/ext directory under your JBuilder installation.

  • Windows: c:\jbuilder6\lib\ext
  • Unix: /usr/local/jbuilder6/lib/ext
  • Mac OS X: /Applications/Developer/JBuilder/lib/ext
(Be sure to delete any existing jbcheckstyle*.jar)

JBuilder Integration

Checkstyle4JBuilder can be activated in the following ways:
  • Toolbar button - Checkstyle4JBuilder will be run on the active file.
  • Configirable* key stroke - Checkstyle4JBuilder will be run on the active file.
  • Editor tabs context menu - Checkstyle4JBuilder will be run on the active file.
  • Project View context menu - Checkstyle4JBuilder will be run on the clicked node in the tree, if the node is a project or package node, Checkstyle4JBuilder will act recursively on the tree.

*Note for Key stroke
JBuilder professional and Enterprise users:
By default the Checkstyle action is not assigned a keystroke. Go to Tools -> IDE Options -> Customize to assign the key. You can find Checkstyle4JBuilder in the category OpenTools.
JBuilder personal users:
Since JBuilder personal does not allow key mapping to be changed Checkstyle4JBuilder defaults to Ctrl-Shift-C.

Configuration

Checkstyle4JBuilder can be configured:

  • Globally - All JBuilder projects use the same settings. Configured via Tools -> IDE Options -> Checkstyle.
  • Project - Checkstyle4JBuilder is configured on a project by project basis. Configured via Project -> Project Properties -> Checkstyle.
  • Properties file - All JBuilder projects use the same settings. Configured via properties file.
By default the Global settings take precedence over the project settings. To use the project settings, enable the "Use Project Settings" checkbox on the Project Property page. A message will be displayed on the Global page when this is enabled.

When a propeties file has been loaded both the Global and Project settings are ignored. A message indcating that a file has been loaded will appear in the Global and Project property pages. To load configuration and an optional properties file add the following:
vmparam -Dcheckstyle.config=c:\checkstyle.xml
vmparam -Dcheckstyle.properties=c:\checkstyle.properties
to:
/lib/ext/jbchecktyle.config

A sample properties file is included in the doc directory in the Checkstyle4JBuilder distribution.