List of usage examples for org.eclipse.jdt.core IType codeComplete
void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic, CompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException;
From source file:org.eclipse.objectteams.otdt.tests.model.AbstractJavaModelCompletionTests.java
License:Open Source License
protected CompletionResult snippetContextComplete(IType type, String snippet, int insertion, int cursorLocation, boolean isStatic) throws JavaModelException { CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, false); type.codeComplete(snippet.toCharArray(), insertion, cursorLocation, null, null, null, isStatic, requestor, this.wcOwner); CompletionResult result = new CompletionResult(); result.proposals = requestor.getResults(); result.context = requestor.getContext(); result.cursorLocation = cursorLocation; return result; }