From edf4cecbb081e04ad5ed95523e777f2249ced622 Mon Sep 17 00:00:00 2001 From: George Fraser Date: Fri, 21 Sep 2018 21:49:12 -0700 Subject: Fix incomplete annotation in inner class --- src/test/java/org/javacs/CompletionsTest.java | 8 ++++++++ .../workspace/src/org/javacs/example/AnnotationInInnerClass.java | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/test/test-project/workspace/src/org/javacs/example/AnnotationInInnerClass.java (limited to 'src/test') diff --git a/src/test/java/org/javacs/CompletionsTest.java b/src/test/java/org/javacs/CompletionsTest.java index 4370c93..52b1921 100644 --- a/src/test/java/org/javacs/CompletionsTest.java +++ b/src/test/java/org/javacs/CompletionsTest.java @@ -768,4 +768,12 @@ public class CompletionsTest extends CompletionsBase { assertThat(suggestions, hasItem(startsWith("class AutocompleteClassName"))); } + + @Test + public void annotationInInnerClass() { + var file = "/org/javacs/example/AnnotationInInnerClass.java"; + var suggestions = insertText(file, 6, 17); + + assertThat(suggestions, hasItem(startsWith("Override"))); + } } diff --git a/src/test/test-project/workspace/src/org/javacs/example/AnnotationInInnerClass.java b/src/test/test-project/workspace/src/org/javacs/example/AnnotationInInnerClass.java new file mode 100644 index 0000000..bbf33c6 --- /dev/null +++ b/src/test/test-project/workspace/src/org/javacs/example/AnnotationInInnerClass.java @@ -0,0 +1,9 @@ +package org.javacs.example; + +class AnnotationInInnerClass { + void test() { + class Inner { + @Ove + } + } +} \ No newline at end of file -- cgit v1.2.3