sdedic commented on a change in pull request #3237:
URL: https://github.com/apache/netbeans/pull/3237#discussion_r727053293



##########
File path: 
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/TextDocumentServiceImpl.java
##########
@@ -284,6 +290,14 @@ public void indexingComplete(Set<URL> indexedRoots) {
         }
         try {
             String uri = params.getTextDocument().getUri();
+            ConfigurationItem conf = new ConfigurationItem();
+            conf.setScopeUri(uri);
+            conf.setSection(NETBEANS_JAVADOC_LOAD_TIMEOUT);
+            client.configuration(new 
ConfigurationParams(Collections.singletonList(conf))).thenAccept(c -> {

Review comment:
       This could eventually compute 1st `completion` request with incorrect 
setting of `javadocTimeout` -- could be the returned CompletableFuture chained 
after this query returns from the server ? Or is it unnecessary ?

##########
File path: ide/api.lsp/src/org/netbeans/spi/lsp/CompletionCollector.java
##########
@@ -353,6 +355,17 @@ public T get() throws InterruptedException, 
ExecutionException {
                 }
                 return super.get();
             }
+
+            @Override
+            public T get(long timeout, TimeUnit unit) throws 
InterruptedException, ExecutionException, TimeoutException {
+                CompletableFuture.supplyAsync(supplier).thenAccept(t -> {

Review comment:
       Would it be possible to use the RequestProcessor API ? That way the 
default Lookup (and connection to the appropriate LSP client) will be 
transferred to the `supplier` thread.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to