diff options
author | George Fraser <george@fivetran.com> | 2018-10-01 19:33:51 -0700 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-10-01 19:36:40 -0700 |
commit | afd13d3988a8581f91666374e8684751caf9da97 (patch) | |
tree | 69b34eff8f59c335279b7c557b2e2fc799a4402e /src/test | |
parent | 6fbc9923a9570482d3fe1fc806788c8036b05f76 (diff) | |
download | java-language-server-afd13d3988a8581f91666374e8684751caf9da97.zip |
Fix import static completions
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/javacs/CompletionsTest.java | 8 | ||||
-rw-r--r-- | src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/CompletionsTest.java b/src/test/java/org/javacs/CompletionsTest.java index 12e7010..585efdf 100644 --- a/src/test/java/org/javacs/CompletionsTest.java +++ b/src/test/java/org/javacs/CompletionsTest.java @@ -792,4 +792,12 @@ public class CompletionsTest extends CompletionsBase { assertThat(suggestions, hasItem(containsString("implements"))); } + + @Test + public void importStaticPackage() { + var file = "/org/javacs/example/AutocompleteImportStatic.java"; + var suggestions = insertText(file, 3, 20); + + assertThat(suggestions, hasItem(containsString("util"))); + } } diff --git a/src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java b/src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java new file mode 100644 index 0000000..4fa93ec --- /dev/null +++ b/src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java @@ -0,0 +1,3 @@ +package org.javacs.example; + +import static java.
\ No newline at end of file |