fixed wrong ast node

This commit is contained in:
Martin Lippert
2017-08-29 13:34:14 +02:00
parent 35f1103303
commit c30e6d558a

View File

@@ -77,6 +77,7 @@ public class BootJavaCompletionEngine implements ICompletionEngine {
private Collection<ICompletionProposal> collectCompletionsForAnnotations(ASTNode node, int offset, IDocument doc) {
Annotation annotation = null;
ASTNode exactNode = node;
while (node != null && !(node instanceof Annotation)) {
node = node.getParent();
@@ -90,7 +91,7 @@ public class BootJavaCompletionEngine implements ICompletionEngine {
if (qualifiedName != null) {
CompletionProvider provider = this.completionProviders.get(qualifiedName);
if (provider != null) {
return provider.provideCompletions(node, annotation, type, offset, doc);
return provider.provideCompletions(exactNode, annotation, type, offset, doc);
}
}
}