blob: 7289f1d38237af9c14c412704630484fb737f55e [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2009" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="reference" name="DC.Type" />
<meta name="DC.Title" content="Tuning validators" />
<meta name="abstract" content="Whether or not a validator validates a particular resource depends on the filters that are in place for that validator." />
<meta name="description" content="Whether or not a validator validates a particular resource depends on the filters that are in place for that validator." />
<meta content="code validation, tuning, validation" name="DC.subject" />
<meta content="code validation, tuning, validation" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/tjvaldisable.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/tjvalglobalpref.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/tjvalmanual.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/tjvalselect.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="rtunevalidat" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Tuning validators</title>
</head>
<body id="rtunevalidat"><a name="rtunevalidat"><!-- --></a>
<h1 class="topictitle1">Tuning validators</h1>
<div><p>Whether or not a validator validates a particular resource depends
on the filters that are in place for that validator.</p>
<div class="section"><div class="p">When a validator is first developed, the implementer of the validator
defines a default set of filters. These filters may be based on:<ul>
<li>file extensions</li>
<li>folder of file names</li>
<li>project natures</li>
<li>project facets</li>
<li>content types</li>
</ul>
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:<ul>
<li>Performance: if you have a very large workspace, you could reduce the
amount of validation.</li>
<li>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.</li>
</ul>
You can access this dialog by clicking <span class="menucascade"><span class="uicontrol">Window</span>
&gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">Validation</span></span> and
then clicking <span class="uicontrol">Settings</span> beside each validator.</div>
<p>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.</p>
</div>
<div class="example"><div class="p">These rules are illustrated with this hypothetical example:<br /><img src="../images/validatefilters.jpg" alt="screen capture&#10;of the validation filters panel showing include and exclude groups" /><br /><ul>
<li>If the resource is in the disabled folder, it will be excluded because
exclusion takes precedence over everything else.</li>
<li>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.</li>
<li>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.</li>
<li>Otherwise the resource will be validated by this particular validator.</li>
</ul>
To add a rule to a group, select the group on the left, and click <span class="uicontrol">Add
Rule</span>.</div>
</div>
</div>
<div><div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="../topics/tjvaldisable.html" title="You can disable one or more validators individually or disable validation entirely. Also, you can set validation settings for your entire workspace and for individual projects.">Disabling validation</a></div>
<div><a href="../topics/tjvalglobalpref.html" title="For a given project, you can override the global validation preferences.">Overriding global validation preferences</a></div>
<div><a href="../topics/tjvalmanual.html" title="When you run a manual validation, all resources in the selected project are validated according to the validation settings.">Manually validating code</a></div>
<div><a href="../topics/tjvalselect.html" title="You can select specific validators to run during manual and build code validation. You can set each validator to run on manual validation, build validation, both, or neither.">Selecting code validators</a></div>
</div>
</div>
</body>
</html>