Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Web Tools Guide
Previous Page Home Next Page

Tuning validators

Whether or not a validator validates a particular resource depends on the filters that are in place for that validator.

When a validator is first developed, the implementer of the validator defines a default set of filters. These filters may be based on:
  • file extensions
  • folder of file names
  • project natures
  • project facets
  • content types
Through the Validation Filters dialog, you are able to further tune these settings.Normally you would simply keep the defaults, however two reasons why you may want to tune validation are:
  • Performance: if you have a very large workspace, you could reduce the amount of validation.
  • Non standard conventions: if you use a non standard naming convention (for example stores XML in files with an .acme-xml extension), you could still enable the appropriate validators to run against those files.
You can access this dialog by clicking Window > Preferences > Validation and then clicking Settings beside each validator.

Filters are stored in groups. There are two types of groups: Include groups and Exclude groups. You can have as many Include groups as you like. Filters inside of an Include group cause resources to be validated. If any rule matches then the entire group matches. Inside of a group the filter rules are OR’d together. However individual Include groups are AND’ed together. You can have one Exclude group. If any of its filter rules match, then the resource is excluded. Exclusion takes precedence over inclusion.

These rules are illustrated with this hypothetical example:
screen capture
of the validation filters panel showing include and exclude groups
  • If the resource is in the disabled folder, it will be excluded because exclusion takes precedence over everything else.
  • If the resource does not have the JSP source content type, and it does not have the JSP fragment source content type, and it does not have a file extension of .jsp or .jspf then it will be excluded because none of the rules in the first group matched.
  • If the project does not have the module core nature then it will be excluded because the single rule in the second group did not match.
  • Otherwise the resource will be validated by this particular validator.
To add a rule to a group, select the group on the left, and click Add Rule.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire