use of org.eclipse.xtext.common.types.xtext.ui.ITypesProposalProvider in project xtext-xtend by eclipse.
the class XtendJavaDocCompletionProposalComputer method exec.
@Override
public ICompletionProposal[] exec(XtextResource resource) throws Exception {
List<ContentAssistContext> contexts = Arrays.asList(protocol.getContextFactory().create(viewer, offset, resource));
if (contexts.size() > 0) {
ContentAssistContext contentAssistContext = contexts.get(contexts.size() - 1);
if (isValidPositionForTypeProposal(contentAssistContext)) {
ITypesProposalProvider typesProposalProvider = protocol.getTypesProposalProvider();
typesProposalProvider.createTypeProposals(protocol.getProposalFactory(), contentAssistContext, TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE__TYPE, this);
}
}
return proposals.toArray(new ICompletionProposal[proposals.size()]);
}
Aggregations