blob: eac91cd2774255a7e9e0f123853d3c7edafba5af [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) 2005-2007 BEA Systems, Inc. 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" >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
Processor Option Input Dialog
</title>
</head>
<body>
<h1>
Processor Option Input Dialog
</h1>
<p>The Processor Option input dialog is reached from the <a href="ref-apt-config.htm">Annotation Processing
preferences pane</a>. It allows processor options to be added or modified.</p>
<p>Options entered here will be presented to processors using the Java 5 Mirror APIs through the
AnnotationProcessorEnvironment interface, or to processors using the Java 6 annotation processing
APIs through the ProcessingEnvironment interface. For Java 5 processors, in order to be compatible
with other implementations of this API, each option will be presented in two forms: as a key/value
pair, and as a combined key corresponding to the command-line form of the option, namely
&quot;-Akey=value&quot;. For instance, an option with key &quot;foo&quot; and value &quot;bar&quot; would be presented
both that way and as key &quot;-Afoo=bar&quot;, value null. For Java 6 processors, the options are
simply presented as a map of key/value pairs, without the -A and without the combined -Akey=value form.</p>
<p>Option values representing paths may begin with a percent-delimited token such as <code>%FOO%/</code>.
If the token is the name of a <a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/concepts/concept-classpath-variables.htm">
classpath variable</a>, it will be replaced with the current value of the variable at processor execution time.
For example, if <code>FOO</code> is a classpath variable that points to <code>d:/foo</code>, then
<code>%FOO%/bar.txt</code> will resolve to <code>d:/foo/bar.txt</code> when the processor is called. If the
classpath variable does not exist, then the raw string (&quot;%FOO%&quot; in this example) will be added to the
environment options. However, the remainder of the string (&quot;bar.txt&quot; in this example) does not need to exist.
The special value <code>ROOT</code> expands to the absolute path of the workspace. For example,
<code>%ROOT%/foo/bar.xml</code> might expand to <code>d:/my_workspace/foo/bar.xml</code>. When using ROOT, the first
segment of the path must actually exist: in the example, the project <code>foo</code> must exist, but
<code>bar.xml</code> need not. Similarly, the special value <code>PROJECT.DIR</code> expands to the absolute path of
the current project.</p>
<p>Certain options such as <code>-classpath</code> and <code>-sourcepath</code> are automatically provided to the
processors (for Java 5 processors; entering them in this dialog will have no effect, since the automatically provided
values will override any values set here), or provided to the processors as variables such as <code>%classpath%</code>
or <code>%sourcepath%</code> (for Java 6 processors). The automatic options are described
<a href="ref-apt-automaticProcessorOptions.htm">here</a>.</p>
</body>
</html>