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 |
int majVersion = (int) (CompilerOptions.versionToJdkLevel(sourceLevel) >>> 16); |
|
|
334 |
switch (majVersion) { |
335 |
case ClassFileConstants.MAJOR_VERSION_1_2: |
336 |
return 1; |
337 |
case ClassFileConstants.MAJOR_VERSION_1_3: |
338 |
return 2; |
339 |
case ClassFileConstants.MAJOR_VERSION_1_4: |
340 |
return 3; |
341 |
case ClassFileConstants.MAJOR_VERSION_1_5: |
342 |
return 4; |
343 |
case ClassFileConstants.MAJOR_VERSION_1_6: |
344 |
return 5; |
345 |
default: |
346 |
// all other cases including ClassFileConstants.MAJOR_VERSION_1_1 |
347 |
return 0; |
348 |
} |
333 |
} |
349 |
} |
334 |
|
350 |
|
335 |
private int sortParticipants(ArrayList group, IConfigurationElement[] configElements, int index) { |
351 |
private int sortParticipants(ArrayList group, IConfigurationElement[] configElements, int index) { |