You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/10/26 14:58:34 UTC

[GitHub] [netbeans] sdedic commented on a change in pull request #2493: Infrastructure to display simple confirmations/questions in LSP client.

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



##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
##########
@@ -216,7 +242,42 @@ Lookup getSessionLookup() {
             capabilities.setDocumentHighlightProvider(true);
             capabilities.setReferencesProvider(true);
             capabilities.setExecuteCommandProvider(new ExecuteCommandOptions(Arrays.asList(JAVA_BUILD_WORKSPACE, GRAALVM_PAUSE_SCRIPT)));
-            return CompletableFuture.completedFuture(new InitializeResult(capabilities));
+            return new InitializeResult(capabilities);
+        }
+        
+        @Override
+        public CompletableFuture<InitializeResult> initialize(InitializeParams init) {

Review comment:
       Note this change: some events are fired synchronously from Open Project. If the code asks for something like DialogDisplayer.notify (which some code really does), the initialization request processing would block - and the notify() round-trip would be never completed, freezing LSP client-server communication completely.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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