blob: 7f9287b4f53052c9648f73640cefa444da9bd444 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2005, v.4002-->
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
"..\dtd\concept.dtd">
<concept id="csrcedt001" xml:lang="en-us">
<title>Source and batch validation</title>
<shortdesc></shortdesc>
<prolog><metadata>
<keywords><indexterm>validation<indexterm>source vs batch</indexterm></indexterm>
</keywords>
</metadata></prolog>
<conbody>
<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>Preferences</uicontrol><uicontrol>General</uicontrol><uicontrol>Editors</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="http://java.sun.com/jsf/html" prefix="h"%>
&lt;%@ taglib uri="http://java.sun.com/jsf/html" 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>Run Validation</uicontrol>
</menucascade> from the popup menu.</p>
<note>To set preferences for batch validation, click <menucascade><uicontrol>Window</uicontrol>
<uicontrol>Preferences</uicontrol><uicontrol>Validation</uicontrol></menucascade></note>
</conbody>
<related-links>
<linkpool type="concept">
<link href="csrcedt004.dita"><linktext>Structured text editors for markup
languages</linktext></link>
</linkpool>
</related-links>
</concept>