### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java,v
retrieving revision 1.119
diff -u -r1.119 CompilationUnitResolver.java
--- dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java 29 Mar 2006 02:54:51 -0000 1.119
+++ dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java 6 Apr 2006 15:42:42 -0000
@@ -127,13 +127,12 @@
public CompilationUnitResolver(
INameEnvironment environment,
IErrorHandlingPolicy policy,
- Map settings,
+ CompilerOptions compilerOptions,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
- boolean statementsRecovery,
IProgressMonitor monitor) {
- super(environment, policy, settings, requestor, problemFactory, false, true/*store annotations in the bindings*/, statementsRecovery);
+ super(environment, policy, compilerOptions, requestor, problemFactory);
this.hasCompilationAborted = false;
this.monitor =monitor;
}
@@ -258,6 +257,13 @@
return compilationUnit;
}
+ protected static CompilerOptions getCompilerOptions(Map options, boolean statementsRecovery) {
+ CompilerOptions compilerOptions = new CompilerOptions(options);
+ compilerOptions.performStatementsRecovery = statementsRecovery;
+ compilerOptions.parseLiteralExpressionsAsConstants = false;
+ compilerOptions.storeAnnotations = true /*store annotations in the bindings*/;
+ return compilerOptions;
+ }
/*
* Low-level API performing the actual compilation
*/
@@ -450,10 +456,9 @@
new CompilationUnitResolver(
environment,
getHandlingPolicy(),
- options,
+ getCompilerOptions(options, statementsRecovery),
getRequestor(),
problemFactory,
- statementsRecovery,
monitor);
resolver.resolve(compilationUnits, bindingKeys, requestor, apiLevel, options, owner);
@@ -494,10 +499,9 @@
new CompilationUnitResolver(
environment,
getHandlingPolicy(),
- options,
+ getCompilerOptions(options, statementsRecovery),
getRequestor(),
- problemFactory,
- statementsRecovery,
+ problemFactory,
monitor);
unit =
Index: eval/org/eclipse/jdt/internal/eval/Evaluator.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/Evaluator.java,v
retrieving revision 1.36
diff -u -r1.36 Evaluator.java
--- eval/org/eclipse/jdt/internal/eval/Evaluator.java 29 Mar 2006 02:57:52 -0000 1.36
+++ eval/org/eclipse/jdt/internal/eval/Evaluator.java 6 Apr 2006 15:42:42 -0000
@@ -24,6 +24,7 @@
import org.eclipse.jdt.internal.compiler.IProblemFactory;
import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.core.util.Util;
/**
@@ -158,13 +159,14 @@
* Creates and returns a compiler for this evaluator.
*/
Compiler getCompiler(ICompilerRequestor compilerRequestor) {
+ CompilerOptions compilerOptions = new CompilerOptions(this.options);
+ compilerOptions.performStatementsRecovery = true;
return new Compiler(
this.environment,
DefaultErrorHandlingPolicies.exitAfterAllProblems(),
- this.options,
+ compilerOptions,
compilerRequestor,
- this.problemFactory,
- true);
+ this.problemFactory);
}
/**
* Builds and returns the source for the current compilation unit.
Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetCompiler.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetCompiler.java,v
retrieving revision 1.25
diff -u -r1.25 CodeSnippetCompiler.java
--- eval/org/eclipse/jdt/internal/eval/CodeSnippetCompiler.java 29 Mar 2006 02:57:52 -0000 1.25
+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetCompiler.java 6 Apr 2006 15:42:42 -0000
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
import org.eclipse.jdt.internal.compiler.IProblemFactory;
import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
/**
* A compiler that compiles code snippets.
@@ -33,13 +34,13 @@
public CodeSnippetCompiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
- Map settings,
+ CompilerOptions compilerOptions,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
EvaluationContext evaluationContext,
int codeSnippetStart,
int codeSnippetEnd) {
- super(environment, policy, settings, requestor, problemFactory, true);
+ super(environment, policy, compilerOptions, requestor, problemFactory);
this.parser =
new CodeSnippetParser(
this.problemReporter,
Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetEvaluator.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetEvaluator.java,v
retrieving revision 1.25
diff -u -r1.25 CodeSnippetEvaluator.java
--- eval/org/eclipse/jdt/internal/eval/CodeSnippetEvaluator.java 29 Mar 2006 02:57:52 -0000 1.25
+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetEvaluator.java 6 Apr 2006 15:42:42 -0000
@@ -22,6 +22,7 @@
import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
import org.eclipse.jdt.internal.compiler.env.IBinaryType;
import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
/**
* A code snippet evaluator compiles and returns class file for a code snippet.
@@ -115,11 +116,13 @@
// use a regular compiler and feed its lookup environment with
// the code snippet support classes
+ CompilerOptions compilerOptions = new CompilerOptions(this.options);
+ compilerOptions.performStatementsRecovery = true;
compiler =
new CodeSnippetCompiler(
this.environment,
DefaultErrorHandlingPolicies.exitAfterAllProblems(),
- this.options,
+ compilerOptions,
compilerRequestor,
this.problemFactory,
this.context,
@@ -149,13 +152,14 @@
// use a wrapped environment so that if the code snippet classes are not found
// then a default implementation is provided.
+ CompilerOptions compilerOptions = new CompilerOptions(this.options);
+ compilerOptions.performStatementsRecovery = true;
compiler = new Compiler(
getWrapperEnvironment(),
DefaultErrorHandlingPolicies.exitAfterAllProblems(),
- this.options,
+ compilerOptions,
compilerRequestor,
- this.problemFactory,
- true);
+ this.problemFactory);
}
return compiler;
}
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
retrieving revision 1.243
diff -u -r1.243 Main.java
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 5 Apr 2006 17:53:20 -0000 1.243
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 6 Apr 2006 15:42:41 -0000
@@ -2806,16 +2806,16 @@
this.startTime = System.currentTimeMillis();
INameEnvironment environment = getLibraryAccess();
+ this.compilerOptions = new CompilerOptions(this.options);
+ this.compilerOptions.performStatementsRecovery = false;
this.batchCompiler =
new Compiler(
environment,
getHandlingPolicy(),
- this.options,
+ this.compilerOptions,
getBatchRequestor(),
getProblemFactory(),
- this.out,
- false);
- this.compilerOptions = this.batchCompiler.options;
+ this.out);
// set the non-externally configurable options.
this.compilerOptions.verbose = this.verbose;
Index: compiler/org/eclipse/jdt/internal/compiler/Compiler.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java,v
retrieving revision 1.76
diff -u -r1.76 Compiler.java
--- compiler/org/eclipse/jdt/internal/compiler/Compiler.java 28 Mar 2006 20:30:01 -0000 1.76
+++ compiler/org/eclipse/jdt/internal/compiler/Compiler.java 6 Apr 2006 15:42:41 -0000
@@ -84,14 +84,12 @@
* them back as part of the compilation unit result.
*/
public Compiler(
- INameEnvironment environment,
- IErrorHandlingPolicy policy,
- Map settings,
- final ICompilerRequestor requestor,
- IProblemFactory problemFactory,
- boolean statementsRecovery) {
- this(environment, policy, settings, requestor, problemFactory,
- null, false, false, false, statementsRecovery); // all defaults
+ INameEnvironment environment,
+ IErrorHandlingPolicy policy,
+ Map settings,
+ final ICompilerRequestor requestor,
+ IProblemFactory problemFactory) {
+ this(environment, policy, new CompilerOptions(settings), requestor, problemFactory, null);
}
/**
@@ -126,22 +124,19 @@
* order to avoid object conversions. Note that the factory is not supposed
* to accumulate the created problems, the compiler will gather them all and hand
* them back as part of the compilation unit result.
- *
- * @param out java.io.PrintWriter
- * Used by the compiler to output messages which are not related to problems,
- * e.g. the information issued in verbose mode. If null, defaults to System.out
- * with automatic flushing.
+ *
+ * @param parseLiteralExpressionsAsConstants boolean
+ * This parameter is used to optimize the literals or leave them as they are in the source.
+ * If you put true, "Hello" + " world" will be converted to "Hello world".
*/
public Compiler(
- INameEnvironment environment,
- IErrorHandlingPolicy policy,
- Map settings,
- final ICompilerRequestor requestor,
- IProblemFactory problemFactory,
- PrintWriter out,
- boolean statementsRecovery) {
- this(environment, policy, settings, requestor, problemFactory, out,
- false, false, false, statementsRecovery); // all defaults
+ INameEnvironment environment,
+ IErrorHandlingPolicy policy,
+ Map settings,
+ final ICompilerRequestor requestor,
+ IProblemFactory problemFactory,
+ boolean parseLiteralExpressionsAsConstants) {
+ this(environment, policy, new CompilerOptions(settings, parseLiteralExpressionsAsConstants), requestor, problemFactory, null);
}
/**
@@ -176,31 +171,14 @@
* order to avoid object conversions. Note that the factory is not supposed
* to accumulate the created problems, the compiler will gather them all and hand
* them back as part of the compilation unit result.
- *
- * @param parseLiteralExpressionsAsConstants boolean
- * This parameter is used to optimize the literals or leave them as they are in the source.
- * If you put true, "Hello" + " world" will be converted to "Hello world".
- *
- * @param storeAnnotations boolean
- * This parameter is used to tell the compiler to store annotations on
- * type bindings, or not.
- *
- * @param statementsRecovery boolean
- * This parameter is used to tell the compiler to perform syntax error
- * recovery on statements, or not.
*/
public Compiler(
- INameEnvironment environment,
- IErrorHandlingPolicy policy,
- Map settings,
- final ICompilerRequestor requestor,
- IProblemFactory problemFactory,
- boolean parseLiteralExpressionsAsConstants,
- boolean storeAnnotations,
- boolean statementsRecovery) {
- this(environment, policy, settings, requestor, problemFactory,
- null, // default
- parseLiteralExpressionsAsConstants, storeAnnotations, true, statementsRecovery);
+ INameEnvironment environment,
+ IErrorHandlingPolicy policy,
+ CompilerOptions options,
+ final ICompilerRequestor requestor,
+ IProblemFactory problemFactory) {
+ this(environment, policy, options, requestor, problemFactory, null);
}
/**
@@ -235,47 +213,16 @@
* order to avoid object conversions. Note that the factory is not supposed
* to accumulate the created problems, the compiler will gather them all and hand
* them back as part of the compilation unit result.
- *
- * @param out java.io.PrintWriter
- * Used by the compiler to output messages which are not related to problems,
- * e.g. the information issued in verbose mode. If null, defaults to System.out
- * with automatic flushing.
- *
- * @param parseLiteralExpressionsAsConstants boolean
- * This parameter is used to optimize the literals or leave them as they are in the source.
- * If you put true, "Hello" + " world" will be converted to "Hello world".
- *
- * @param storeAnnotations boolean
- * This parameter is used to tell the compiler to store annotations on
- * type bindings, or not.
- *
- * @param flag boolean
- * Set to true if and only if the following boolean parameters are significant:
- * parseLiteralExpressionsAsConstants
, storeAnnotations
.
- *
- * @param statementsRecovery boolean
- * This parameter is used to tell the compiler to perform syntax error
- * recovery on statements, or not.
*/
- private Compiler(
+ public Compiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
- Map settings,
+ CompilerOptions options,
final ICompilerRequestor requestor,
IProblemFactory problemFactory,
- PrintWriter out,
- boolean parseLiteralExpressionsAsConstants,
- boolean storeAnnotations,
- boolean flag,
- boolean statementsRecovery) {
-
- // create a problem handler given a handling policy
- this.options = new CompilerOptions(settings);
- this.options.performStatementsRecovery = statementsRecovery;
- if (flag) { // boolean parameters are significant, pass them down
- this.options.parseLiteralExpressionsAsConstants = parseLiteralExpressionsAsConstants;
- this.options.storeAnnotations = storeAnnotations;
- }
+ PrintWriter out) {
+
+ this.options = options;
// wrap requestor in DebugRequestor if one is specified
if(DebugRequestor == null) {
Index: model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java,v
retrieving revision 1.54
diff -u -r1.54 CompilationUnitProblemFinder.java
--- model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java 29 Mar 2006 03:08:48 -0000 1.54
+++ model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java 6 Apr 2006 15:42:43 -0000
@@ -23,6 +23,7 @@
import org.eclipse.jdt.internal.compiler.env.AccessRestriction;
import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
import org.eclipse.jdt.internal.compiler.env.ISourceType;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.compiler.lookup.PackageBinding;
import org.eclipse.jdt.internal.compiler.parser.Parser;
import org.eclipse.jdt.internal.compiler.parser.SourceTypeConverter;
@@ -55,7 +56,7 @@
* in UI when compiling interactively.
* @see org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies
*
- * @param settings The settings to use for the resolution.
+ * @param compilerOptions The compiler options to use for the resolution.
*
* @param requestor org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
* Component which will receive and persist all compilation results and is intended
@@ -73,20 +74,15 @@
protected CompilationUnitProblemFinder(
INameEnvironment environment,
IErrorHandlingPolicy policy,
- Map settings,
+ CompilerOptions compilerOptions,
ICompilerRequestor requestor,
- IProblemFactory problemFactory,
- boolean creatingAST,
- boolean statementsRecovery) {
+ IProblemFactory problemFactory) {
super(environment,
policy,
- settings,
+ compilerOptions,
requestor,
- problemFactory,
- !creatingAST/*parse literal expressions as constants only if not creating a DOM AST*/,
- creatingAST/*store annotations in the bindings if creating a DOM AST*/,
- statementsRecovery/*perform statements recovery during parse if creating a DOM AST*/
+ problemFactory
);
}
@@ -117,6 +113,14 @@
}
}
+ protected static CompilerOptions getCompilerOptions(Map settings, boolean creatingAST, boolean statementsRecovery) {
+ CompilerOptions compilerOptions = new CompilerOptions(settings);
+ compilerOptions.performStatementsRecovery = statementsRecovery;
+ compilerOptions.parseLiteralExpressionsAsConstants = !creatingAST; /*parse literal expressions as constants only if not creating a DOM AST*/
+ compilerOptions.storeAnnotations = creatingAST; /*store annotations in the bindings if creating a DOM AST*/
+ return compilerOptions;
+ }
+
/*
* Low-level API performing the actual compilation
*/
@@ -157,11 +161,9 @@
problemFinder = new CompilationUnitProblemFinder(
environment,
getHandlingPolicy(),
- project.getOptions(true),
+ getCompilerOptions(project.getOptions(true), creatingAST, statementsRecovery),
getRequestor(),
- problemFactory,
- creatingAST,
- statementsRecovery);
+ problemFactory);
if (parser != null) {
problemFinder.parser = parser;
}
Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v
retrieving revision 1.166
diff -u -r1.166 CompilerOptions.java
--- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 28 Mar 2006 20:33:18 -0000 1.166
+++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 6 Apr 2006 15:42:42 -0000
@@ -309,6 +309,11 @@
if (settings == null) return;
set(settings);
}
+
+ public CompilerOptions(Map settings, boolean parseLiteralExpressionsAsConstants){
+ this(settings);
+ this.parseLiteralExpressionsAsConstants = parseLiteralExpressionsAsConstants;
+ }
public Map getMap() {
Map optionsMap = new HashMap(30);
Index: model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java,v
retrieving revision 1.94
diff -u -r1.94 AbstractImageBuilder.java
--- model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java 29 Mar 2006 03:08:49 -0000 1.94
+++ model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java 6 Apr 2006 15:42:43 -0000
@@ -418,13 +418,14 @@
}
// called once when the builder is initialized... can override if needed
+ CompilerOptions compilerOptions = new CompilerOptions(projectOptions);
+ compilerOptions.performStatementsRecovery = true;
Compiler newCompiler = new Compiler(
nameEnvironment,
DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- projectOptions,
+ compilerOptions,
this,
- ProblemFactory.getProblemFactory(Locale.getDefault()),
- true);
+ ProblemFactory.getProblemFactory(Locale.getDefault()));
CompilerOptions options = newCompiler.options;
// enable the compiler reference info support
#P org.eclipse.jdt.core.tests
Index: Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/FromPRsTest.java
===================================================================
RCS file: /data/cvs/eclipse/org.eclipse.jdt.core.tests/Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/FromPRsTest.java,v
retrieving revision 1.32
diff -u -r1.32 FromPRsTest.java
--- Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/FromPRsTest.java 29 Mar 2006 05:07:13 -0000 1.32
+++ Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/FromPRsTest.java 6 Apr 2006 15:42:44 -0000
@@ -17,6 +17,7 @@
import org.eclipse.jdt.core.tests.util.Util;
import org.eclipse.jdt.internal.compiler.Compiler;
import org.eclipse.jdt.internal.compiler.IProblemFactory;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
public class FromPRsTest extends AbstractRegressionTest {
public FromPRsTest(String name) {
@@ -33,14 +34,15 @@
IProblemFactory problemFactory = getProblemFactory();
Requestor requestor = new Requestor(problemFactory, OUTPUT_DIR.endsWith(File.separator) ? OUTPUT_DIR : OUTPUT_DIR + File.separator, false, null, false, false);
+ CompilerOptions compilerOptions = new CompilerOptions(getCompilerOptions());
+ compilerOptions.performStatementsRecovery = false;
Compiler batchCompiler =
new Compiler(
getNameEnvironment(testFiles, classLib),
getErrorHandlingPolicy(),
- getCompilerOptions(),
+ compilerOptions,
requestor,
- problemFactory,
- false);
+ problemFactory);
batchCompiler.options.produceReferenceInfo = true;
batchCompiler.compile(Util.compilationUnits(new String[] {testFiles[0], testFiles[1]})); // feed only first file
#P org.eclipse.jdt.core.tests.compiler
Index: src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java,v
retrieving revision 1.59
diff -u -r1.59 AbstractRegressionTest.java
--- src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java 3 Apr 2006 13:50:19 -0000 1.59
+++ src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java 6 Apr 2006 15:42:46 -0000
@@ -388,15 +388,16 @@
if (customOptions != null) {
options.putAll(customOptions);
}
+ CompilerOptions compilerOptions = new CompilerOptions(options);
+ compilerOptions.performStatementsRecovery = false;
Compiler batchCompiler =
new Compiler(
getNameEnvironment(new String[]{}, classLib),
getErrorHandlingPolicy(),
- options,
+ compilerOptions,
requestor,
- problemFactory,
- false);
- batchCompiler.options.produceReferenceInfo = true;
+ problemFactory);
+ compilerOptions.produceReferenceInfo = true;
try {
batchCompiler.compile(Util.compilationUnits(testFiles)); // compile all files together
} catch(RuntimeException e) {
@@ -496,14 +497,15 @@
false, /* show category */
false /* show warning token*/);
+ CompilerOptions compilerOptions = new CompilerOptions(getCompilerOptions());
+ compilerOptions.performStatementsRecovery = false;
Compiler batchCompiler =
new Compiler(
getNameEnvironment(new String[]{}, classLib),
getErrorHandlingPolicy(),
getCompilerOptions(),
requestor,
- problemFactory,
- false);
+ problemFactory);
batchCompiler.options.produceReferenceInfo = true;
Throwable exception = null;
try {
@@ -649,14 +651,15 @@
if (customOptions != null) {
options.putAll(customOptions);
}
+ CompilerOptions compilerOptions = new CompilerOptions(options);
+ compilerOptions.performStatementsRecovery = false;
Compiler batchCompiler =
new Compiler(
getNameEnvironment(new String[]{}, classLib),
getErrorHandlingPolicy(),
- options,
+ compilerOptions,
requestor,
- problemFactory,
- false);
+ problemFactory);
batchCompiler.options.produceReferenceInfo = true;
Throwable exception = null;
try {
@@ -719,14 +722,15 @@
if (customOptions != null) {
options.putAll(customOptions);
}
+ CompilerOptions compilerOptions = new CompilerOptions(options);
+ compilerOptions.performStatementsRecovery = false;
Compiler batchCompiler =
new Compiler(
getNameEnvironment(new String[]{}, classLib),
getErrorHandlingPolicy(),
- options,
+ compilerOptions,
requestor,
- problemFactory,
- false);
+ problemFactory);
batchCompiler.options.produceReferenceInfo = true;
try {
batchCompiler.compile(Util.compilationUnits(testFiles)); // compile all files together
Index: src/org/eclipse/jdt/core/tests/util/Util.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java,v
retrieving revision 1.44
diff -u -r1.44 Util.java
--- src/org/eclipse/jdt/core/tests/util/Util.java 29 Mar 2006 03:52:04 -0000 1.44
+++ src/org/eclipse/jdt/core/tests/util/Util.java 6 Apr 2006 15:42:46 -0000
@@ -82,14 +82,15 @@
return false;
}
};
+ CompilerOptions compilerOptions = new CompilerOptions(options);
+ compilerOptions.performStatementsRecovery = false;
Compiler batchCompiler =
new Compiler(
nameEnvironment,
errorHandlingPolicy,
- options,
+ compilerOptions,
requestor,
- problemFactory,
- false);
+ problemFactory);
batchCompiler.options.produceReferenceInfo = true;
batchCompiler.compile(compilationUnits(pathsAndContents)); // compile all files together
System.err.print(requestor.problemLog); // problem log empty if no problems