Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2011 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 |
Lines 16-21
Link Here
|
16 |
import org.eclipse.core.runtime.IProgressMonitor; |
16 |
import org.eclipse.core.runtime.IProgressMonitor; |
17 |
import org.eclipse.jdt.core.CompletionRequestor; |
17 |
import org.eclipse.jdt.core.CompletionRequestor; |
18 |
import org.eclipse.jdt.core.IJavaProject; |
18 |
import org.eclipse.jdt.core.IJavaProject; |
|
|
19 |
import org.eclipse.jdt.core.JavaCore; |
19 |
import org.eclipse.jdt.core.WorkingCopyOwner; |
20 |
import org.eclipse.jdt.core.WorkingCopyOwner; |
20 |
import org.eclipse.jdt.core.compiler.*; |
21 |
import org.eclipse.jdt.core.compiler.*; |
21 |
import org.eclipse.jdt.internal.codeassist.CompletionEngine; |
22 |
import org.eclipse.jdt.internal.codeassist.CompletionEngine; |
Lines 28-33
Link Here
|
28 |
import org.eclipse.jdt.internal.compiler.env.IBinaryType; |
29 |
import org.eclipse.jdt.internal.compiler.env.IBinaryType; |
29 |
import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; |
30 |
import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; |
30 |
import org.eclipse.jdt.internal.compiler.env.INameEnvironment; |
31 |
import org.eclipse.jdt.internal.compiler.env.INameEnvironment; |
|
|
32 |
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; |
31 |
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; |
33 |
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; |
32 |
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities; |
34 |
import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities; |
33 |
import org.eclipse.jdt.internal.compiler.util.SuffixConstants; |
35 |
import org.eclipse.jdt.internal.compiler.util.SuffixConstants; |
Lines 128-133
Link Here
|
128 |
// Do nothing |
130 |
// Do nothing |
129 |
} |
131 |
} |
130 |
final char[] className = "CodeSnippetCompletion".toCharArray(); //$NON-NLS-1$ |
132 |
final char[] className = "CodeSnippetCompletion".toCharArray(); //$NON-NLS-1$ |
|
|
133 |
final long complianceVersion = CompilerOptions.versionToJdkLevel(options.get(JavaCore.COMPILER_COMPLIANCE)); |
131 |
final CodeSnippetToCuMapper mapper = new CodeSnippetToCuMapper( |
134 |
final CodeSnippetToCuMapper mapper = new CodeSnippetToCuMapper( |
132 |
codeSnippet, |
135 |
codeSnippet, |
133 |
this.packageName, |
136 |
this.packageName, |
Lines 138-144
Link Here
|
138 |
this.localVariableTypeNames, |
141 |
this.localVariableTypeNames, |
139 |
this.localVariableModifiers, |
142 |
this.localVariableModifiers, |
140 |
this.declaringTypeName, |
143 |
this.declaringTypeName, |
141 |
this.lineSeparator |
144 |
this.lineSeparator, |
|
|
145 |
complianceVersion |
142 |
); |
146 |
); |
143 |
ICompilationUnit sourceUnit = new ICompilationUnit() { |
147 |
ICompilationUnit sourceUnit = new ICompilationUnit() { |
144 |
public char[] getFileName() { |
148 |
public char[] getFileName() { |
Lines 570-575
Link Here
|
570 |
WorkingCopyOwner owner) { |
574 |
WorkingCopyOwner owner) { |
571 |
|
575 |
|
572 |
final char[] className = "CodeSnippetSelection".toCharArray(); //$NON-NLS-1$ |
576 |
final char[] className = "CodeSnippetSelection".toCharArray(); //$NON-NLS-1$ |
|
|
577 |
final long complianceVersion = CompilerOptions.versionToJdkLevel(options.get(JavaCore.COMPILER_COMPLIANCE)); |
573 |
final CodeSnippetToCuMapper mapper = new CodeSnippetToCuMapper( |
578 |
final CodeSnippetToCuMapper mapper = new CodeSnippetToCuMapper( |
574 |
codeSnippet, |
579 |
codeSnippet, |
575 |
this.packageName, |
580 |
this.packageName, |
Lines 580-586
Link Here
|
580 |
this.localVariableTypeNames, |
585 |
this.localVariableTypeNames, |
581 |
this.localVariableModifiers, |
586 |
this.localVariableModifiers, |
582 |
this.declaringTypeName, |
587 |
this.declaringTypeName, |
583 |
this.lineSeparator |
588 |
this.lineSeparator, |
|
|
589 |
complianceVersion |
584 |
); |
590 |
); |
585 |
ICompilationUnit sourceUnit = new ICompilationUnit() { |
591 |
ICompilationUnit sourceUnit = new ICompilationUnit() { |
586 |
public char[] getFileName() { |
592 |
public char[] getFileName() { |