blob: 7796212ba34f9d22b87bc6e83b044df10bbc8f51 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html lang="en-us" xml:lang="en-us">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2008 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 Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "" l gen true r (n 0 s 0 v 0 l 0) "" l gen true r (SS~~000 1))' />
<meta content="concept" name="DC.Type" />
<meta name="DC.Title" content="Source and batch validation" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<meta content="validation, source versus batch" name="DC.subject" />
<meta content="validation, source versus batch" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="csrcedt004.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="csrcedt001" 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>Source and batch validation</title>
<body id="csrcedt001"><a name="csrcedt001"><!-- --></a>
<h1 class="topictitle1">Source and batch validation</h1>
<div><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">&lt;foo:bar&gt;</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>
&gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">General</span> &gt; <span class="uicontrol">Editors</span>
&gt; <span class="uicontrol">Structured Text Editors</span></span> and check (or
uncheck) <strong>Report problems as you type</strong>.</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><br />
<samp class="codeph">&lt;%@ taglib uri="" prefix="h"%&gt;<br />
&lt;%@ taglib uri="" prefix="h"%&gt;</samp></p>
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">Validate</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>
&gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">Validation</span></span></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