Avoid receiving notification and sending notification on the same thread
This commit is contained in:
@@ -164,7 +164,7 @@ public final class SimpleLanguageServer implements Sts4LanguageServer, SpringInd
|
||||
}
|
||||
WorkDoneProgressCreateParams params = new WorkDoneProgressCreateParams();
|
||||
params.setToken(taskId);
|
||||
client.createProgress(params).thenAccept((p) -> {
|
||||
client.createProgress(params).thenAcceptAsync((p) -> {
|
||||
ProgressParams progressParams = new ProgressParams();
|
||||
progressParams.setToken(taskId);
|
||||
progressParams.setValue(Either.forLeft(report));
|
||||
|
||||
@@ -504,7 +504,7 @@ public class SpringSymbolIndex implements InitializingBean, SpringIndex {
|
||||
}
|
||||
|
||||
CompletableFuture<Void> future = CompletableFuture.allOf((CompletableFuture[]) futures.toArray(new CompletableFuture[futures.size()]));
|
||||
future = future.thenAccept(v -> server.getClient().indexUpdated()).thenAccept(v -> listeners.fire(v));
|
||||
future = future.thenAcceptAsync(v -> server.getClient().indexUpdated()).thenAccept(v -> listeners.fire(v));
|
||||
return future;
|
||||
}
|
||||
}
|
||||
@@ -565,7 +565,7 @@ public class SpringSymbolIndex implements InitializingBean, SpringIndex {
|
||||
}
|
||||
}
|
||||
CompletableFuture<Void> future = CompletableFuture.allOf((CompletableFuture[]) futures.toArray(new CompletableFuture[futures.size()]));
|
||||
future = future.thenAccept(v -> server.getClient().indexUpdated()).thenAccept(v -> listeners.fire(v));
|
||||
future = future.thenAcceptAsync(v -> server.getClient().indexUpdated()).thenAccept(v -> listeners.fire(v));
|
||||
return future;
|
||||
}
|
||||
}
|
||||
@@ -640,7 +640,7 @@ public class SpringSymbolIndex implements InitializingBean, SpringIndex {
|
||||
}
|
||||
|
||||
CompletableFuture<Void> future = CompletableFuture.allOf((CompletableFuture[]) futures.toArray(new CompletableFuture[futures.size()]));
|
||||
future = future.thenAccept(v -> server.getClient().indexUpdated()).thenAccept(v -> listeners.fire(v));
|
||||
future = future.thenAcceptAsync(v -> server.getClient().indexUpdated()).thenAccept(v -> listeners.fire(v));
|
||||
return future;
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
@@ -162,7 +162,7 @@ public class ModulithService {
|
||||
if (refreshed) {
|
||||
server.getClient().showMessage(new MessageParams(MessageType.Info, "Project '" + project.getElementName() + "' Modulith metadata has been changed."));
|
||||
} else {
|
||||
server.getClient().showMessage(new MessageParams(MessageType.Info, "Project '" + project.getElementName() + "' Modulith metadata has been refreshed but it has not unchanged."));
|
||||
server.getClient().showMessage(new MessageParams(MessageType.Info, "Project '" + project.getElementName() + "' Modulith metadata has been refreshed but it has not changed."));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user