org.eclipse.xtext.ide.server.contentassist.ContentAssistService Java Examples

The following examples show how to use org.eclipse.xtext.ide.server.contentassist.ContentAssistService. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LanguageServerImpl.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Compute the completion items.
 */
protected Either<List<CompletionItem>, CompletionList> completion(CancelIndicator originalCancelIndicator,
		CompletionParams params) {
	URI uri = getURI(params);
	ContentAssistService contentAssistService = getService(uri, ContentAssistService.class);
	if (contentAssistService == null) {
		return Either.forRight(new CompletionList());
	}
	BufferedCancelIndicator cancelIndicator = new BufferedCancelIndicator(originalCancelIndicator);
	return Either.forRight(workspaceManager.doRead(uri,
			(doc, res) -> contentAssistService.createCompletionList(doc, res, params, cancelIndicator)));
}
 
Example #2
Source File: JSONIdeModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
public Class<? extends ContentAssistService> bindContentAssistService() {
	return PatchedContentAssistService.class;
}