Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
student:eclipse:checkstyle [2019/12/12 11:44] bernstdhstudent:eclipse:checkstyle [2023/01/18 13:49] (current) bernstdh
Line 1: Line 1:
- 
  
 ===== The Checkstyle Plugin for Eclipse ===== ===== The Checkstyle Plugin for Eclipse =====
Line 7: Line 6:
 ==== Installation ==== ==== Installation ====
  
-The easiest way to install the Eclipse Checkstyle Plugin is as follows. +There are three different ways to install the Eclipse Checkstyle Plugin. They are described at the [[ http://eclipse-cs.sourceforge.net/#!/install |  Checkstyle Plugin site ]]. At the moment, the "update site" seems to be the most reliable approach.
- +
-  - Start a WWW browser and navigate to [[ http://eclipse-cs.sourceforge.net/ | 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 <key>Confirm</key>+
-  - Check "I accept..." and click on <key>Finish</key>+
-  - If you get a message about "unsigned content", click <key>OK</key>+
-  - Restart Eclipse. +
- +
-Several alternative methods are discussed at the [[ http://eclipse-cs.sourceforge.net/#!/install |  Checkstyle Plugin site ]].+
  
 If none of the normal methods work, you may want to consider installing the plugin manually. If none of the normal methods work, you may want to consider installing the plugin manually.
Line 46: Line 35:
 ==== Loading a Checks File (Configuration File) ==== ==== Loading a Checks File (Configuration File) ====
  
-You can set the checks file for a particular project or for all of the projects in a workspace. If you use one workspace for all of your courses you should probably use the first approach. If you have a workspace for each course then you should probably use the second approach.+You can set the checks file for all of the projects in a workspace or for each project individually. 
 +If you have a different workspace for each course then you should probably use the first approach
 +which is described in the [[ student:eclipse:install#install_and_use_a_custom_checks_configuration_file | page on installing Eclipse ]]. If you use one workspace for all of your courses then you should probably use the second approach as follows:
  
-=== Setting the Checks File for a Project === +  - Download the file to an appropriate location on your local  file system. 
-  +  - In Eclipse, right-click on the project, and pull down to <key>Properties</key>
-  - Download the file to an appropriate location on your local           file system. +  - Select "Checkstyle" and click on the  "Local Check Configurations" tab.
-  - In Eclipse, right-click on the project, and pull down to           <key>Properties</key>+
-  - Select "Checkstyle" and click on the           "Local Check Configurations" tab.+
   - Click on <key>New</key>.   - Click on <key>New</key>.
-  - Select "External Configuration File", enter a "Name:" and           the "Location:" of the file, and click <key>OK</key>.+  - Select "External Configuration File", enter a "Name:" and the "Location:" of the file, and click <key>OK</key>.
   - Select the "Main" tab.   - Select the "Main" tab.
   - Select the appropriate configuration file from the drop-down list.   - Select the appropriate configuration file from the drop-down list.
   - Click on <key>OK</key>.   - Click on <key>OK</key>.
   - When the "Rebuild suggested" dialog appears, click on <key>Yes</key>.   - When the "Rebuild suggested" dialog appears, click on <key>Yes</key>.
- 
- 
-=== Setting the Checks File for a Workspace === 
-  
-  - Download the file to an appropriate location on your local           file system. 
-  - In Eclipse, click on <key>Window+Preferences</key> or <key>Eclipse+Preferences</key> (depending on your operating system). 
-  - Expand <key>Checkstyle</key>. 
-  - Click on <key>New</key>. 
-  - Select "External Configuration File", enter a "Name:" and  the "Location:" of the file, and click <key>OK</key>. 
-  - Select the appropriate configuration file. 
-  -  Click on <key>Set as Default</key> 
-  - Click on <key>Apply and Close</key>. 
-  - When the "Rebuild suggested" dialog appears, click on <key>Yes</key>. 
-