|
Lines 1-10
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2006, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2006, 2013 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* |
7 |
* |
|
|
8 |
* This is an implementation of an early-draft specification developed under the Java |
| 9 |
* Community Process (JCP) and is made available for testing and evaluation purposes |
| 10 |
* only. The code is not compatible with any specification of the JCP. |
| 11 |
* |
| 8 |
* Contributors: |
12 |
* Contributors: |
| 9 |
* IBM Corporation - initial API and implementation |
13 |
* IBM Corporation - initial API and implementation |
| 10 |
*******************************************************************************/ |
14 |
*******************************************************************************/ |
|
Lines 46-54
Link Here
|
| 46 |
private static Set<SourceVersion> SupportedSourceVersions; |
50 |
private static Set<SourceVersion> SupportedSourceVersions; |
| 47 |
static { |
51 |
static { |
| 48 |
// Eclipse compiler supports all possible versions from version 0 to |
52 |
// Eclipse compiler supports all possible versions from version 0 to |
| 49 |
// version 6 |
53 |
// latest supported version |
| 50 |
// we don't care about the order |
54 |
// we don't care about the order |
| 51 |
EnumSet<SourceVersion> enumSet = EnumSet.range(SourceVersion.RELEASE_0, SourceVersion.RELEASE_6); |
55 |
EnumSet<SourceVersion> enumSet = EnumSet.range(SourceVersion.RELEASE_0, SourceVersion.latestSupported()); |
| 52 |
// we don't want anybody to modify this list |
56 |
// we don't want anybody to modify this list |
| 53 |
EclipseCompiler.SupportedSourceVersions = Collections.unmodifiableSet(enumSet); |
57 |
EclipseCompiler.SupportedSourceVersions = Collections.unmodifiableSet(enumSet); |
| 54 |
} |
58 |
} |
|
Lines 115-123
Link Here
|
| 115 |
eclipseCompiler2.fileManager = this.getStandardFileManager(someDiagnosticListener, null, null); |
119 |
eclipseCompiler2.fileManager = this.getStandardFileManager(someDiagnosticListener, null, null); |
| 116 |
} |
120 |
} |
| 117 |
|
121 |
|
| 118 |
eclipseCompiler2.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); |
122 |
eclipseCompiler2.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8); |
| 119 |
eclipseCompiler2.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); |
123 |
eclipseCompiler2.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8); |
| 120 |
eclipseCompiler2.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); |
124 |
eclipseCompiler2.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8); |
| 121 |
|
125 |
|
| 122 |
ArrayList<String> allOptions = new ArrayList<String>(); |
126 |
ArrayList<String> allOptions = new ArrayList<String>(); |
| 123 |
if (options != null) { |
127 |
if (options != null) { |