summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--src/main/java/org/javacs/CompileFile.java7
-rw-r--r--src/main/java/org/javacs/JavaLanguageServer.java2
3 files changed, 3 insertions, 8 deletions
diff --git a/README.md b/README.md
index 96dc276..ec8d7a2 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
A Java [language server](https://github.com/Microsoft/vscode-languageserver-protocol) implemented using the Java compiler API.
-[![CircleCI](https://circleci.com/gh/georgewfraser/java-language-server.svg?style=svg)](https://circleci.com/gh/georgewfraser/java-language-server)
+[![CircleCI](https://circleci.com/gh/georgewfraser/java-language-server.png)](https://circleci.com/gh/georgewfraser/java-language-server)
## Installation
diff --git a/src/main/java/org/javacs/CompileFile.java b/src/main/java/org/javacs/CompileFile.java
index f0d2f86..46029ae 100644
--- a/src/main/java/org/javacs/CompileFile.java
+++ b/src/main/java/org/javacs/CompileFile.java
@@ -4,12 +4,7 @@ import com.sun.source.tree.*;
import com.sun.source.util.*;
import java.io.IOException;
import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
+import java.util.*;
import java.util.function.Predicate;
import java.util.logging.Logger;
import javax.lang.model.element.*;
diff --git a/src/main/java/org/javacs/JavaLanguageServer.java b/src/main/java/org/javacs/JavaLanguageServer.java
index 65d95dc..a7f93f8 100644
--- a/src/main/java/org/javacs/JavaLanguageServer.java
+++ b/src/main/java/org/javacs/JavaLanguageServer.java
@@ -328,12 +328,12 @@ class JavaLanguageServer extends LanguageServer {
@Override
public Optional<CompletionList> completion(TextDocumentPositionParams position) {
- // TODO reuse previous compilation when changes are small
var started = Instant.now();
var uri = position.textDocument.uri;
if (!FileStore.isJavaFile(uri)) return Optional.empty();
var line = position.position.line + 1;
var column = position.position.character + 1;
+ LOG.info(String.format("Complete at %s(%d,%d)", uri.getPath(), line, column));
// Figure out what kind of completion we want to do
var maybeCtx = compiler.parseFile(uri).completionContext(line, column);
// TODO don't complete inside of comments