blob: c430e77febd852fa3471c8eaf930f9507ec29de8 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2006, v.4002-->
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
<concept id="csrcedt001" xml:lang="en-us">
<title>Source and batch validation</title>
<keywords><indexterm keyref="cvalidate|1|validationsourcevsbatch" status="changed">validation<indexterm>source
versus batch</indexterm></indexterm></keywords>
<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>
<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:<lines><codeph>&lt;foo:bar></codeph></lines>where <codeph>foo:bar</codeph>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.<note>To turn source validation
on (or off) for all structured text editors, click <menucascade><uicontrol>Window</uicontrol>
<uicontrol>Structured Text Editors</uicontrol></menucascade> and check (or
uncheck) <b>Report problems as you type</b>.</note></p>
<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:<lines>
<codeph>&lt;%@ taglib uri="" prefix="h"%>
&lt;%@ taglib uri="" prefix="h"%></codeph></lines>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. </p>
<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 <menucascade><uicontrol>Validate</uicontrol>
</menucascade> from the popup menu.</p>
<note>To set preferences for batch validation, click <menucascade><uicontrol>Window</uicontrol>
<linkpool type="concept">
<link href="csrcedt004.dita"><linktext>Structured text editors for markup