use of org.eclipse.jdt.ls.core.internal.handlers.CompletionResolveHandler in project eclipse.jdt.ls by eclipse.
the class SyntaxLanguageServer method resolveCompletionItem.
/* (non-Javadoc)
* @see org.eclipse.lsp4j.services.TextDocumentService#resolveCompletionItem(org.eclipse.lsp4j.CompletionItem)
*/
@Override
public CompletableFuture<CompletionItem> resolveCompletionItem(CompletionItem unresolved) {
logInfo(">> document/resolveCompletionItem");
CompletionResolveHandler handler = new CompletionResolveHandler(preferenceManager);
final IProgressMonitor[] monitors = new IProgressMonitor[1];
CompletableFuture<CompletionItem> result = computeAsync((monitor) -> {
monitors[0] = monitor;
if ((Boolean.getBoolean(JAVA_LSP_JOIN_ON_COMPLETION))) {
waitForLifecycleJobs(monitor);
}
return handler.resolve(unresolved, monitor);
});
result.join();
if (monitors[0].isCanceled()) {
result.cancel(true);
}
return result;
}
Aggregations