summaryrefslogtreecommitdiff
path: root/src/main/java/org/javacs/JavaLanguageServer.java
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2019-01-06 13:21:44 -0800
committerGeorge Fraser <george@fivetran.com>2019-01-06 13:21:44 -0800
commitd2942ecf8b33af9bcf02e585f669b0c85c05e77b (patch)
tree9755ff777884a6210565290f59519972f220ccbb /src/main/java/org/javacs/JavaLanguageServer.java
parentae08ea7010b47a4210d30ae9e6e192c5d8a01a5e (diff)
downloadjava-language-server-d2942ecf8b33af9bcf02e585f669b0c85c05e77b.zip
Read from FileStore
Diffstat (limited to 'src/main/java/org/javacs/JavaLanguageServer.java')
-rw-r--r--src/main/java/org/javacs/JavaLanguageServer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/javacs/JavaLanguageServer.java b/src/main/java/org/javacs/JavaLanguageServer.java
index 2a6ee1b..33a44e5 100644
--- a/src/main/java/org/javacs/JavaLanguageServer.java
+++ b/src/main/java/org/javacs/JavaLanguageServer.java
@@ -362,6 +362,8 @@ class JavaLanguageServer extends LanguageServer {
}
// Compile again, focusing on a region that depends on what type of completion we want to do
var ctx = maybeCtx.get();
+ // TODO CompileFocus should have a "patch" mechanism where we recompile the current file without creating a new
+ // task
var focus = compiler.compileFocus(uri, content, ctx.line, ctx.character);
// Do a specific type of completion
List<Completion> cs;
@@ -750,6 +752,8 @@ class JavaLanguageServer extends LanguageServer {
var content = FileStore.contents(uri);
var line = position.position.line + 1;
var column = position.position.character + 1;
+ // TODO CompileFocus should have a "patch" mechanism where we recompile the current file without creating a new
+ // task
var focus = compiler.compileFocus(uri, content, line, column);
var help = focus.methodInvocation().map(this::asSignatureHelp);
return help;