Compare commits
2 Commits
72ef89baa9
...
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<>();
|
HashMap<String, String> textDocuments = new HashMap<>();
|
||||||
CodeSnippetOptions codeSnippetOptions = new CodeSnippetOptions();
|
CodeSnippetOptions codeSnippetOptions = new CodeSnippetOptions();
|
||||||
TextHelper textHelper = new TextHelper();
|
TextHelper textHelper = new TextHelper();
|
||||||
|
Boolean dontShowHints = false;
|
||||||
TypeResolver typeResolver = new TypeResolver();
|
TypeResolver typeResolver = new TypeResolver();
|
||||||
Path fileRoot = null;
|
Path fileRoot = null;
|
||||||
|
|
||||||
@@ -283,6 +284,8 @@ public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.Tex
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log("[didSave] Error trying to get Inlay-Hints and Diagnostics for Client: " + e.getMessage(), MessageType.Error);
|
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 {
|
} finally {
|
||||||
currentlyCalculating = false;
|
currentlyCalculating = false;
|
||||||
@@ -295,6 +298,7 @@ public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.Tex
|
|||||||
|
|
||||||
stopLoading("compile-task", "Types successfully inferred", client);
|
stopLoading("compile-task", "Types successfully inferred", client);
|
||||||
|
|
||||||
|
dontShowHints = false;
|
||||||
updateClient(client);
|
updateClient(client);
|
||||||
|
|
||||||
ArrayList<File> files = new ArrayList<>();
|
ArrayList<File> files = new ArrayList<>();
|
||||||
@@ -309,7 +313,7 @@ public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.Tex
|
|||||||
@Override
|
@Override
|
||||||
public CompletableFuture<List<InlayHint>> inlayHint(InlayHintParams params) {
|
public CompletableFuture<List<InlayHint>> inlayHint(InlayHintParams params) {
|
||||||
log("[inlayHint] The Client requested Inlay-Hints.", MessageType.Info);
|
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
|
@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