Lines 44-49
Link Here
|
44 |
import org.eclipse.jdt.internal.compiler.ast.TypeReference; |
44 |
import org.eclipse.jdt.internal.compiler.ast.TypeReference; |
45 |
import org.eclipse.jdt.internal.compiler.ast.Wildcard; |
45 |
import org.eclipse.jdt.internal.compiler.ast.Wildcard; |
46 |
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; |
46 |
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; |
|
|
47 |
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; |
47 |
import org.eclipse.jdt.internal.compiler.lookup.BlockScope; |
48 |
import org.eclipse.jdt.internal.compiler.lookup.BlockScope; |
48 |
import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers; |
49 |
import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers; |
49 |
import org.eclipse.jdt.internal.compiler.lookup.TypeConstants; |
50 |
import org.eclipse.jdt.internal.compiler.lookup.TypeConstants; |
Lines 73-85
Link Here
|
73 |
public ASTConverter(Map options, boolean resolveBindings, IProgressMonitor monitor) { |
74 |
public ASTConverter(Map options, boolean resolveBindings, IProgressMonitor monitor) { |
74 |
this.resolveBindings = resolveBindings; |
75 |
this.resolveBindings = resolveBindings; |
75 |
Object sourceModeSetting = options.get(JavaCore.COMPILER_SOURCE); |
76 |
Object sourceModeSetting = options.get(JavaCore.COMPILER_SOURCE); |
76 |
long sourceLevel = ClassFileConstants.JDK1_3; |
77 |
long sourceLevel = CompilerOptions.versionToJdkLevel(sourceModeSetting); |
77 |
if (JavaCore.VERSION_1_4.equals(sourceModeSetting)) { |
78 |
if (sourceLevel == 0) { |
78 |
sourceLevel = ClassFileConstants.JDK1_4; |
79 |
// unknown sourceModeSetting |
79 |
} else if (JavaCore.VERSION_1_5.equals(sourceModeSetting)) { |
80 |
sourceLevel = ClassFileConstants.JDK1_3; |
80 |
sourceLevel = ClassFileConstants.JDK1_5; |
|
|
81 |
} |
81 |
} |
82 |
|
|
|
83 |
this.scanner = new Scanner( |
82 |
this.scanner = new Scanner( |
84 |
true /*comment*/, |
83 |
true /*comment*/, |
85 |
false /*whitespace*/, |
84 |
false /*whitespace*/, |