blob: 9d538e7f0c313dfdd2904636e1e4e37c50eb48fa [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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wtp.doc.user/common.css" />
<title>Enabling automatic code validation</title>
</head>
<body id="tjvalauto"><a name="tjvalauto"><!-- --></a>
<h1 class="topictitle1">Enabling automatic code validation</h1>
<div><p>If you want validation to occur automatically during an automatic
incremental build that occurs as a result of a resource change, you can enable
automatic code validation.</p>
<div class="section"> <p>You can enable automatic code validation for all projects in
your workspace or for only the ones you select.</p>
<p></p>
</div>
<ol><li><span>On the workbench menu bar, click <span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span></span>. The Preferences window opens.</span></li>
<li><span>Click <span class="uicontrol">Validation</span> on the left pane of the
window. This page lists validation options for your entire workspace.</span></li>
<li><span>Select the <span class="uicontrol">Run validation automatically when you save
changes to a resource</span> check box.</span></li>
<li><span>If you want to allow individual projects to have different validation
settings, select the <span class="uicontrol">Allow projects to override these preference
settings</span> check box.</span></li>
<li><span>Choose the validators that you want to use by selecting or clearing
the check boxes next to the list of validators.</span></li>
<li><span>Click <span class="uicontrol">OK</span>. Now, your projects will be validated
automatically when they are changed.</span></li>
<li><span>If you want to set different automatic validation
settings for specific projects, follow these steps:</span><ol type="a"><li><span>In the Project Explorer view, right-click a project and click <span class="uicontrol">Properties</span>.
The Properties window opens.</span></li>
<li><span>Click <span class="uicontrol">Validation</span> on the left pane of
the window. This page lists validation options for the project.</span></li>
<li><span>On the Validation page, select the <span class="uicontrol">Override validation
preferences</span> check box.</span></li>
<li><span>If you want this project to be validated automatically when
you make changes, select the <span class="uicontrol">Run validation automatically when
you make changes to <var class="varname">project_name</var> resources</span> check
box.</span></li>
<li><span>Choose the validators that you want to use by selecting or clearing
the check boxes next to the list of validators.</span></li>
<li><span>Click <span class="uicontrol">OK</span>.</span></li>
</ol>
</li>
</ol>
<div class="section"> <p>If any errors are detected, an error or warning message is logged
in the Problems view. These messages cannot be removed manually. Once the
problem is fixed that caused the messages to be generated, the messages are
automatically removed. You can, however, use the Filter Tasks wizard to temporarily
filter out any messages in the Problems view until you can fix the associated
problems. To open the Filter Tasks wizard, click the Filters icon in the title
bar of the Problems view. Alternatively, if you do not want to see any problems
detected by a particular validator, on a particular project, you can disable
the validator in the project's Properties page. When a validator is disabled,
all messages from that validator are removed.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/tjval.html">Validating code in enterprise applications</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="../topics/tjvalbuild.html" title="You can enable validation to occur during a build of a project.">Enabling build validation</a></div>
<div><a href="../topics/tjvaldisable.html" title="You can disable one or more validators for a project.">Disabling a validator</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 with the validators that are selected on the Validation page of the project Properties dialog.">Manually validating code</a></div>
<div><a href="../topics/tjvalselect.html" title="You can select specific validators to run for a project during manual and automatic code validation.">Selecting code validators</a></div>
</div>
</div></body>
</html>