From afd13d3988a8581f91666374e8684751caf9da97 Mon Sep 17 00:00:00 2001 From: George Fraser Date: Mon, 1 Oct 2018 19:33:51 -0700 Subject: Fix import static completions --- src/test/java/org/javacs/CompletionsTest.java | 8 ++++++++ .../src/org/javacs/example/AutocompleteImportStatic.java | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java (limited to 'src/test') 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 -- cgit v1.2.3