JBuilder Opentools

Checkstyle4JBuilder v4.0 and later

Installing

  1. Download Checkstyle4JBuilder binary distribution from the download page.
  2. Unzip the file you downloaded to $JBuilderHome\lib\ext

Running

Checkstyle4JBuilder can be activated in the following ways (see screenshot):
  1. Toolbar button - Checkstyle4JBuilder will be run on the active file.
  2. Editor tabs context menu - Checkstyle4JBuilder will be run on the active file.
  3. 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.
  4. Configirable* key stroke - Checkstyle4JBuilder will be run on the active file.


*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 in a few different ways:
  • Globally - All JBuilder projects use the same settings. Configured via Tools -> IDE Options -> Checkstyle (pre JBuilder2005) or Tools -> Preferences -> Checkstyle (JBuilder2005).
  • 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.


Uninstalling

  1. Delete the c4jb directory from $JBuilderHome\lib\ext
  2. Delete c4jb.config from $JBuilderHome\lib\ext
  3. Delete checkstyle*.jar from $JBuilderHome\lib\ext

Troubleshooting

Use $JBuilderHome\bin\jbuilderw.exe -verbose at a command prompt to run JBuilder in verbose mode and watch the output.