Lines 42-47
Link Here
|
42 |
import org.eclipse.jdt.internal.codeassist.CompletionEngine; |
42 |
import org.eclipse.jdt.internal.codeassist.CompletionEngine; |
43 |
import org.eclipse.jdt.internal.codeassist.SelectionEngine; |
43 |
import org.eclipse.jdt.internal.codeassist.SelectionEngine; |
44 |
import org.eclipse.jdt.internal.compiler.Compiler; |
44 |
import org.eclipse.jdt.internal.compiler.Compiler; |
|
|
45 |
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; |
45 |
import org.eclipse.jdt.internal.compiler.env.AccessRestriction; |
46 |
import org.eclipse.jdt.internal.compiler.env.AccessRestriction; |
46 |
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; |
47 |
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; |
47 |
import org.eclipse.jdt.internal.compiler.util.HashtableOfObjectToInt; |
48 |
import org.eclipse.jdt.internal.compiler.util.HashtableOfObjectToInt; |
Lines 329-335
Link Here
|
329 |
*/ |
330 |
*/ |
330 |
private int indexForSourceLevel(String sourceLevel) { |
331 |
private int indexForSourceLevel(String sourceLevel) { |
331 |
if (sourceLevel == null) return 0; |
332 |
if (sourceLevel == null) return 0; |
332 |
return sourceLevel.charAt(2) - 49; |
333 |
long jdkLevel = CompilerOptions.versionToJdkLevel(sourceLevel); |
|
|
334 |
if (jdkLevel == 0) { |
335 |
if (VERBOSE) { |
336 |
System.out.println(sourceLevel+" is not a valid compiler source level (1.1 -> 1.6 expected)"); //$NON-NLS-1$ |
337 |
} |
338 |
return 0; |
339 |
} |
340 |
return ((int)(jdkLevel >>> 16)) - ClassFileConstants.MAJOR_VERSION_1_1; |
333 |
} |
341 |
} |
334 |
|
342 |
|
335 |
private int sortParticipants(ArrayList group, IConfigurationElement[] configElements, int index) { |
343 |
private int sortParticipants(ArrayList group, IConfigurationElement[] configElements, int index) { |