Validating code in enterprise applications

The workbench includes validators that check certain files in your enterprise application module projects for errors.

By default, the workbench validates your files automatically after any build, including automatic builds. You can also begin the validation process manually without building.

On the workbench Properties window, you can enable or disable validators to be used on your projects. Also, you can enable or disable validators for each enterprise application module project individually on the Properties page for that project.

Each validator can apply to certain types of files, certain project natures, and certain project facets. When a validator applies to a project facet or nature, the workbench uses that validator only on projects that have that facet or nature. Likewise, most validators apply only to certain types of files, so the workbench uses those validators only on those types of files.

Follow these steps to validate your files:

  1. Click Window > Preferences .
  2. In the Preferences window, click Validation in the left pane. The Validation page of the Preferences window lists the validators available in your project and their settings.
  3. If you want to set individual validation settings for one or more of your projects, select the Allow projects to override these preference settings check box.
  4. To prevent validation at the global level, select the Suspend all validators check box. If you select this check box, you can still enable validation at the project level.
  5. If you want to save any resources you have modified before the validation begins, select the Save all modified resources automatically prior to validating check box.
  6. In the list of validators, select the check boxes next to each validator you want to use at the global level. Each validator has a check box to specify whether it is used on manual validation or on build validation.
  7. Choose an alternate implementation for a validator by clicking the button in the Settings column. Not all validators have alternate implementations.
  8. Click OK.
  9. If you want to set individual validation settings for one or more of your projects, see Overriding global validation preferences.
  10. Begin the validation process by one of the following methods:
    • Right-click a project and click Run Validation.
    • Start a build.
Any errors found by the validators are listed in the Problems view.