### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: dom/org/eclipse/jdt/core/dom/ASTParser.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java,v retrieving revision 1.97 diff -u -r1.97 ASTParser.java --- dom/org/eclipse/jdt/core/dom/ASTParser.java 22 Feb 2010 15:40:37 -0000 1.97 +++ dom/org/eclipse/jdt/core/dom/ASTParser.java 5 Mar 2010 14:53:47 -0000 @@ -338,7 +338,7 @@ * to {@link JavaCore#getOptions()}. In either case, and especially * in the latter, the caller should carefully weight the consequences of * allowing compiler options to be defaulted as opposed to being - * explicitly specified for the ASTParser instance. + * explicitly specified for the {@link ASTParser} instance. * For instance, there is a compiler option called "Source Compatibility Mode" * which determines which JDK level the source code is expected to meet. * If you specify "1.4", then "assert" is treated as a keyword and disallowed @@ -427,12 +427,13 @@ * Requests an abridged abstract syntax tree. * By default, complete ASTs are returned. *

- * When true the resulting AST does not have nodes for + * When the given position is a valid position within the source code of + * the compilation unit, the resulting AST does not have nodes for * the entire compilation unit. Rather, the AST is only fleshed out * for the node that include the given source position. This kind of limited * AST is sufficient for certain purposes but totally unsuitable for others. * In places where it can be used, the limited AST offers the advantage of - * being smaller and faster to construct. + * being smaller and faster to construct. *

*

* The AST will include nodes for all of the compilation unit's @@ -449,7 +450,7 @@ * Field declarations are never abridged. Note that the AST for the body of * that one unabridged method (or initializer) is 100% complete; it has all * its statements, including any local or anonymous type declarations - * embedded within them. When the the given position is not located within + * embedded within them. When the given position is not located within * the source range of any body declaration of a top-level type, the AST * returned will be a skeleton that includes nodes for all and only the major * declarations; this kind of AST is still quite useful because it contains @@ -530,7 +531,7 @@ *

*

* Binding information is only computed when kind is - * K_COMPILATION_UNIT. + * {@link #K_COMPILATION_UNIT}. *

* *

This kind is not used when the AST is built using @@ -569,9 +570,10 @@ /** * Sets the source code to be parsed. - * This method automatically sets the project (and compiler + * + *

This method automatically sets the project (and compiler * options) based on the given compilation unit, in a manner - * equivalent to setProject(source.getJavaProject()) + * equivalent to {@link #setProject(IJavaProject) setProject(source.getJavaProject())}.

* *

This source is not used when the AST is built using * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.

@@ -585,11 +587,12 @@ /** * Sets the source code to be parsed. + * *

This method automatically sets the project (and compiler * options) based on the given compilation unit, in a manner - * equivalent to setProject(source.getJavaProject()).

+ * equivalent to {@link #setProject(IJavaProject) setProject(source.getJavaProject())}.

*

If the given class file has no source attachment, the creation of the - * ast will fail with an IllegalStateException.

+ * ast will fail with an {@link IllegalStateException}.

* *

This source is not used when the AST is built using * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.

@@ -603,11 +606,12 @@ /** * Sets the source code to be parsed. + * *

This method automatically sets the project (and compiler * options) based on the given compilation unit of class file, in a manner - * equivalent to setProject(source.getJavaProject()).

+ * equivalent to {@link #setProject(IJavaProject) setProject(source.getJavaProject())}.

*

If the source is a class file without source attachment, the creation of the - * ast will fail with an IllegalStateException.

+ * ast will fail with an {@link IllegalStateException}.

* *

This source is not used when the AST is built using * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.

@@ -703,10 +707,12 @@ } /** - * Sets the name of the compilation unit that would hypothetically contains - * the source string. This is used in conjunction with {@link #setSource(char[])} - * and {@link #setProject(IJavaProject) } to locate the compilation unit relative to a Java project. - * Defaults to none (null). + * Sets the name of the compilation unit that would hypothetically contains the + * source string. + * + *

This is used in conjunction with {@link #setSource(char[])} + * and {@link #setProject(IJavaProject)} to locate the compilation unit relative to a Java project. + * Defaults to none (null).

*

* The name of the compilation unit must be supplied for resolving bindings. * This name should be suffixed by a dot ('.') followed by one of the @@ -731,19 +737,20 @@ /** * Sets the Java project used when resolving bindings. - * This method automatically sets the compiler - * options based on the given project: + * + *

This method automatically sets the compiler + * options based on the given project:

*
 	 * setCompilerOptions(project.getOptions(true));
 	 * 
- * See {@link #setCompilerOptions(Map)} for a discussion of + *

See {@link #setCompilerOptions(Map)} for a discussion of * the pros and cons of using these options vs specifying - * compiler options explicitly. - * This setting is used in conjunction with setSource(char[]). + * compiler options explicitly.

+ *

This setting is used in conjunction with {@link #setSource(char[])}. * For the purposes of resolving bindings, types declared in the * source string will hide types by the same name available - * through the classpath of the given project. - * Defaults to none (null). + * through the classpath of the given project.

+ *

Defaults to none (null).

* * @param project the Java project used to resolve names, or * null if none @@ -758,12 +765,12 @@ } /** - * Creates an abstract syntax tree. - *

- * A successful call to this method returns all settings to their - * default values so the object is ready to be reused. - *

- * + * Creates an abstract syntax tree. + *

+ * A successful call to this method returns all settings to their + * default values so the object is ready to be reused. + *

+ * * @param monitor the progress monitor used to report progress and request cancellation, * or null if none * @return an AST node whose type depends on the kind of parse @@ -970,15 +977,17 @@ } } /** - * Creates bindings for a batch of Java elements. These elements are either - * enclosed in {@link ICompilationUnit}s or in {@link IClassFile}s. + * Creates bindings for a batch of Java elements. + * + *

These elements are either + * enclosed in {@link ICompilationUnit ICompilationUnits} or in {@link IClassFile IClassFiles}.

*

* All enclosing compilation units and class files must * come from the same Java project, which must be set beforehand * with {@link #setProject(IJavaProject) setProject}. *

*

- * All elements must exist. If one doesn't exist, an IllegalStateException + * All elements must exist. If one doesn't exist, an {@link IllegalStateException} * is thrown. *

*