| <?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.wst.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>If automatic incremental builds are disabled, automatic code |
| validation cannot be enabled.</p> |
| <p>To enable automatic code validation:</p> |
| </div> |
| <ol><li class="stepexpand"><span>On the workbench menu bar, click <span class="menucascade"><span class="uicontrol">Window</span> > <span class="uicontrol">Preferences</span></span>.</span></li> |
| <li class="stepexpand"><span>In the left frame of the Preferences window, click <span class="menucascade"><span class="uicontrol">General</span> > <span class="uicontrol">Workspace</span></span>.</span></li> |
| <li class="stepexpand"><span>Select the <span class="uicontrol">Build automatically</span> check box.</span></li> |
| <li class="stepexpand"><span>Click <span class="uicontrol">OK</span>.</span></li> |
| <li class="stepexpand"><span>In the Project Explorer view, right-click your project and click <span class="uicontrol">Properties</span>.</span></li> |
| <li class="stepexpand"><span>On the <span class="uicontrol">Validation</span> page, select the <span class="uicontrol">Override |
| validation preferences</span> check box to override global preferences |
| for this project.</span></li> |
| <li class="stepexpand"><span>Ensure that the validators that you want to run are selected.</span></li> |
| <li class="stepexpand"><span>Select the <span class="uicontrol">Run validation automatically when you save |
| changes to <var class="varname"><project_name></var> resources</span> check |
| box. This check box is only enabled when both of the following conditions |
| are met:</span> <ul><li>The <span class="uicontrol">Build automatically</span> check box is selected in |
| the workbench Preferences dialog</li> |
| <li>The selected project supports automatic validation</li> |
| </ul> |
| </li> |
| <li class="stepexpand"><span>Click <span class="uicontrol">OK</span>.</span></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> |