Bug 96414

Summary: Javadoc of ASTParser#setCompilerOptions(..): mention that setProject(..) resets options
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Jim des Rivieres <jeem>
Status: VERIFIED FIXED QA Contact:
Severity: trivial    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-05-24 08:25:31 EDT
N20050523-0010

The javadoc of ASTParser#setProject(..) mentions that this method also calls
ASTParser#setCompilerOptions(..).

There should also be a note in the javadoc of ASTParser#setCompilerOptions(..)
that mentions that setProject(..) and two of the setSource(..) methods reset the
compiler options.
Comment 1 Jim des Rivieres CLA 2005-05-24 14:59:43 EDT
Clarified spec as follows:

/**
 * Sets the compiler options to be used when parsing.
 * <p>
 * The compiler options default to {@link JavaCore#getOptions()}.
 * </p>
 * <p>
 * Note that {@link #setSource(IClassFile)},
 * {@link #setSource(ICompilationUnit)},
 * and {@link #setProject(IJavaProject)} reset the compiler options
 * based on the Java project.
 * </p>
 * 
 * @param options the table of options (key type: <code>String</code>;
 * value type: <code>String</code>), or <code>null</code>
 * to set it back to the default
 */
public void setCompilerOptions(Map options)
Comment 2 Olivier Thomann CLA 2005-05-27 10:35:08 EDT
Verified in I20050526-2000