Skip to content

Commit

Permalink
fix: MicroProfileRestClientDiagnosticsParticipant validateInterfaceTy…
Browse files Browse the repository at this point in the history
…pe is called with no progress indicator (#500)

Fixes #480

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
  • Loading branch information
jeffmaury authored Feb 3, 2022
1 parent 9bd8b6f commit 5e29065
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
package com.redhat.devtools.intellij.quarkus.lsp;

import com.intellij.openapi.module.Module;
import com.intellij.openapi.progress.EmptyProgressIndicator;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
Expand Down Expand Up @@ -98,13 +99,13 @@ public void sourceUpdated(List<Pair<Module, VirtualFile>> sources) {
<R> CompletableFuture<R> runAsBackground(String title, Supplier<R> supplier) {
CompletableFuture<R> future = new CompletableFuture<>();
CompletableFuture.runAsync(() -> {
Runnable task = () -> {
Runnable task = () -> ProgressManager.getInstance().runProcess(() -> {
try {
future.complete(supplier.get());
} catch (Throwable t) {
future.completeExceptionally(t);
}
};
}, new EmptyProgressIndicator());
if (DumbService.getInstance(getProject()).isDumb()) {
DumbService.getInstance(getProject()).runWhenSmart(task);
} else {
Expand Down

1 comment on commit 5e29065

@xunit-reporter
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test status

Success Failed Errored Skipped
0 5 0 0

Please sign in to comment.