if (documentOffset == -1) {
documentOffset = strDoc.length();
}
IDocument doc = new Document(strDoc);
CompletionRequest request = new CompletionRequest(file, nature, doc, documentOffset, codeCompletion);
ICompletionState state = CompletionStateFactory.getEmptyCompletionState(nature, new CompletionCache());
state.setTokenImportedModules(imports);
List<Object> props = new ArrayList<Object>(participant.getGlobalCompletions(request, state));
ICompletionProposal[] codeCompletionProposals = PyCodeCompletionUtils.onlyValidSorted(props, request.qualifier,