| <?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> |
| <!-- /******************************************************************************* |
| * Copyright (c) 2000, 2006 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>Source and batch validation</title> |
| </head> |
| <body id="csrcedt001"><a name="csrcedt001"><!-- --></a> |
| <h1 class="topictitle1">Source and batch validation</h1> |
| <div><p></p> |
| <p>There are two types of validation that can occur when you are working with |
| source files in a structured source editor: source validation and batch validation. </p> |
| <div class="p">Source validation occurs as you type your code; this validation reflects |
| the "unsaved" and "unbuilt" contents of the source you are editing. For example, |
| if you were to type the following code in a JSP editor:<p><samp class="codeph"><foo:bar></samp></p> |
| where <samp class="codeph">foo:bar</samp>is |
| a tag that does not exist, the problem would be discovered immediately and |
| would appear underlined in the editor. The advantage of this type of validation |
| is that it can alert you to errors instantly.<div class="note"><span class="notetitle">Note:</span> To turn source validation |
| on (or off) for all structured text editors, click <span class="menucascade"><span class="uicontrol">Window</span> > <span class="uicontrol">Preferences</span> > <span class="uicontrol">General</span> > <span class="uicontrol">Editors</span> > <span class="uicontrol">Structured Text Editors</span></span> and check (or |
| uncheck) <strong>Report problems as you type</strong>.</div> |
| </div> |
| <div class="p">Batch validation occurs on saved files. It can catch build process errors |
| and other errors that the source validator cannot. For example, suppose you |
| typed the following in a JSP editor:<p><samp class="codeph"><%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%><br /> |
| <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%></samp></p> |
| In |
| this example, the same prefix is used twice. This would prompt the batch validator |
| to trigger markers and to generate build warnings in the Problems view and |
| in the Navigator. </div> |
| <p>Batch validation can uncover errors in multiple files at once and give |
| you a comprehensive view of where problematic code can be found in your project. |
| Moreover, you do not need to open files in an editor to run batch validation. |
| To run batch validation on specific files, select and right click the files |
| in the Project Explorer and then select <span class="menucascade"><span class="uicontrol">Run Validation</span></span> from the popup menu.</p> |
| <div class="note"><span class="notetitle">Note:</span> To set preferences for batch validation, click <span class="menucascade"><span class="uicontrol">Window</span> > <span class="uicontrol">Preferences</span> > <span class="uicontrol">Validation</span></span></div> |
| </div> |
| <div><div class="relconcepts"><strong>Related concepts</strong><br /> |
| <div><a href="csrcedt004.html" title="Structured text editor is any of several text editors that you can use to edit various markup languages such as HTML, JavaScript, or XML.">Structured text editors for markup |
| languages</a></div> |
| </div> |
| </div></body> |
| </html> |