diff options
author | Olivier Thomann | 2007-02-15 19:05:22 +0000 |
---|---|---|
committer | Olivier Thomann | 2007-02-15 19:05:22 +0000 |
commit | 9bee1c6f3c6bf50ec7f9dbd9166f81542168adc6 (patch) | |
tree | 9a508e1a817ea655b4fb0e5c0eab84bf43200f7d /org.eclipse.jdt.compiler.tool | |
parent | 50bce8c3f61bb3d688d9edafa1d2a65300b2c4a3 (diff) | |
download | eclipse.jdt.core-9bee1c6f3c6bf50ec7f9dbd9166f81542168adc6.tar.gz eclipse.jdt.core-9bee1c6f3c6bf50ec7f9dbd9166f81542168adc6.tar.xz eclipse.jdt.core-9bee1c6f3c6bf50ec7f9dbd9166f81542168adc6.zip |
HEAD - Fix for 168910
Diffstat (limited to 'org.eclipse.jdt.compiler.tool')
-rw-r--r-- | org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java index 79abfa1005..a3798663e9 100644 --- a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java +++ b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java @@ -48,6 +48,7 @@ import org.eclipse.jdt.internal.compiler.IProblemFactory; import org.eclipse.jdt.internal.compiler.batch.CompilationUnit; import org.eclipse.jdt.internal.compiler.batch.FileSystem; import org.eclipse.jdt.internal.compiler.batch.Main; +import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment; import org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit; import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; @@ -266,6 +267,7 @@ public class EclipseCompiler extends Main implements JavaCompiler { * javax.tools.JavaFileManager, javax.tools.DiagnosticListener, * java.lang.Iterable, java.lang.Iterable, java.lang.Iterable) */ + @SuppressWarnings("unchecked") public CompilationTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, @@ -290,11 +292,14 @@ public class EclipseCompiler extends Main implements JavaCompiler { this.fileManager = this.getStandardFileManager(diagnosticListener, null, null); } - this.initialize(writerOut, writerErr, false); + initialize(writerOut, writerErr, false); + this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); + this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); + this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); ArrayList<String> allOptions = new ArrayList<String>(); if (options != null) { - for (Iterator<String> iterator = options.iterator(); iterator.hasNext(); ) { + for (Iterator<String> iterator = options.iterator(); iterator.hasNext(); ) { this.fileManager.handleOption(iterator.next(), iterator); } for (String option : options) { @@ -347,7 +352,7 @@ public class EclipseCompiler extends Main implements JavaCompiler { Processor[] processors2 = new Processor[temp.size()]; temp.toArray(processors2); EclipseCompiler.this.processors = processors2; - } + } }; } |