Skip to content

Commit

Permalink
eclipse-jdtlsGH-508: Adopt the new call hierarchy LSP
Browse files Browse the repository at this point in the history
Signed-off-by: Jinbo Wang <[email protected]>
  • Loading branch information
testforstephen committed Dec 18, 2019
1 parent 51ae939 commit 43c901e
Show file tree
Hide file tree
Showing 27 changed files with 292 additions and 2,365 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

import org.eclipse.core.runtime.IProgressMonitor;
Expand Down Expand Up @@ -190,10 +191,10 @@ public String computeJavaDoc(CompletionProposal proposal) {

String javadoc = null;
try {
javadoc = new SimpleTimeLimiter().callWithTimeout(() -> {
javadoc = SimpleTimeLimiter.create(Executors.newCachedThreadPool()).callWithTimeout(() -> {
Reader reader = JavadocContentAccess.getPlainTextContentReader(method);
return reader == null? null:CharStreams.toString(reader);
}, 500, TimeUnit.MILLISECONDS, true);
}, 500, TimeUnit.MILLISECONDS);
} catch (UncheckedTimeoutException tooSlow) {
} catch (Exception e) {
JavaLanguageServerPlugin.logException("Unable to read documentation", e);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 43c901e

Please sign in to comment.