Compare commits
2 Commits
0.0.2
...
ca6fa89e3f
Author | SHA1 | Date | |
---|---|---|---|
|
ca6fa89e3f | ||
|
8cde997c15 |
@@ -42,6 +42,7 @@ public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.Tex
|
||||
HashMap<String, String> textDocuments = new HashMap<>();
|
||||
CodeSnippetOptions codeSnippetOptions = new CodeSnippetOptions();
|
||||
TextHelper textHelper = new TextHelper();
|
||||
Boolean dontShowHints = false;
|
||||
TypeResolver typeResolver = new TypeResolver();
|
||||
Path fileRoot = null;
|
||||
|
||||
@@ -283,6 +284,8 @@ public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.Tex
|
||||
|
||||
} catch (Exception e) {
|
||||
log("[didSave] Error trying to get Inlay-Hints and Diagnostics for Client: " + e.getMessage(), MessageType.Error);
|
||||
client.showMessage(new MessageParams(MessageType.Error, e.getMessage()));
|
||||
updateGlobalMaps(new ArrayList<>(), new ArrayList<>(), didSaveTextDocumentParams.getTextDocument().getUri());
|
||||
|
||||
} finally {
|
||||
currentlyCalculating = false;
|
||||
@@ -295,6 +298,7 @@ public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.Tex
|
||||
|
||||
stopLoading("compile-task", "Types successfully inferred", client);
|
||||
|
||||
dontShowHints = false;
|
||||
updateClient(client);
|
||||
|
||||
ArrayList<File> files = new ArrayList<>();
|
||||
@@ -309,7 +313,7 @@ public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.Tex
|
||||
@Override
|
||||
public CompletableFuture<List<InlayHint>> inlayHint(InlayHintParams params) {
|
||||
log("[inlayHint] The Client requested Inlay-Hints.", MessageType.Info);
|
||||
return CompletableFuture.supplyAsync(() -> globalInlayHintMap.get(params.getTextDocument().getUri()) == null ? Collections.emptyList() : globalInlayHintMap.get(params.getTextDocument().getUri()));
|
||||
return CompletableFuture.supplyAsync(() -> dontShowHints ? Collections.emptyList() : globalInlayHintMap.get(params.getTextDocument().getUri()) == null ? Collections.emptyList() : globalInlayHintMap.get(params.getTextDocument().getUri()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -515,7 +519,11 @@ public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.Tex
|
||||
}
|
||||
}
|
||||
|
||||
return CompletableFuture.completedFuture(actions);
|
||||
|
||||
dontShowHints = true;
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return actions;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user