Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chandra2020-07-21 11:21:08 -0400
committerVikas Chandra2020-07-22 04:18:09 -0400
commit701a2aaba92ac6df72920cf9b4d65c03ed89647d (patch)
tree7c6bcb45621be97ccf772580323bb4351a995c0b
parent6fa78495565afa96e5ad245a143572f423a53493 (diff)
downloadeclipse.jdt.core-701a2aaba92ac6df72920cf9b4d65c03ed89647d.tar.gz
eclipse.jdt.core-701a2aaba92ac6df72920cf9b4d65c03ed89647d.tar.xz
eclipse.jdt.core-701a2aaba92ac6df72920cf9b4d65c03ed89647d.zip
Change-Id: If46884db8e7519a070571ba0eee18a7410446ca1 Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java17
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java2
2 files changed, 18 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java
index 1c712f8810..1af2738a43 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java
@@ -14629,4 +14629,21 @@ public void testBug15589() throws JavaModelException {
"Collection[TYPE_REF]{Collection, java.util, Ljava.util.Collection;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}",
result.proposals);
}
+public void test565386() throws JavaModelException {
+ this.workingCopies = new ICompilationUnit[1];
+ this.workingCopies[0] = getWorkingCopy(
+ "/Completion/src/test/MyAnno.java",
+ "package test;\n" +
+ "public @interface MyAnno {\n" +
+ "int age();"+
+ "}\n");
+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, true, true, true, true, true);
+ requestor.allowAllRequiredProposals();
+ String str = this.workingCopies[0].getSource();
+ String completeBehind = "age";
+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+ assertTrue(requestor.getResults().equals(""));
+
+}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index 17de30f6a8..a5053f3a74 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -1732,7 +1732,7 @@ protected void consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() {
}
protected void consumeAnnotationTypeMemberDeclaration() {
// AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
- AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
+ MethodDeclaration annotationTypeMemberDeclaration = (MethodDeclaration) this.astStack[this.astPtr];
annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
// store the this.endPosition (position just before the '}') in case there is
// a trailing comment behind the end of the method

Back to the top