From 6d354374e220f250bfd464c115e979a28dcb6ae9 Mon Sep 17 00:00:00 2001 From: Eric Milles Date: Sat, 29 Dec 2018 10:19:30 -0600 Subject: [PATCH] Fix for completing annotation attribute names; favorites aren't relevant --- .../AnnotationMemberValueCompletionProcessorFactory.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/factories/AnnotationMemberValueCompletionProcessorFactory.java b/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/factories/AnnotationMemberValueCompletionProcessorFactory.java index b34082aa17..d0dacf7b59 100644 --- a/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/factories/AnnotationMemberValueCompletionProcessorFactory.java +++ b/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/factories/AnnotationMemberValueCompletionProcessorFactory.java @@ -154,6 +154,8 @@ private void generateAnnotationMemberValueProposals(List pr // generate field proposals from the current scope and (if applicable) enum constants FieldProposalCreator fieldProposalCreator = initProposalCreator(new FieldProposalCreator()); + fieldProposalCreator.setFavoriteStaticMembers(context.getFavoriteStaticMembers()); + fieldProposalCreator.setCurrentScope(context.getPerceivedCompletionScope()); List completionTypes = new ArrayList<>(2); if (context.containingDeclaration instanceof ClassNode) { @@ -216,9 +218,6 @@ private String getPerceivedCompletionMember() { private T initProposalCreator(T proposalCreator) { AssistOptions options = new AssistOptions(javaContext.getProject().getOptions(true)); - - proposalCreator.setCurrentScope(context.getPerceivedCompletionScope()); - proposalCreator.setFavoriteStaticMembers(context.getFavoriteStaticMembers()); proposalCreator.setNameMatchingStrategy((String pattern, String candidate) -> { return ProposalUtils.matches(pattern, candidate, options.camelCaseMatch, options.substringMatch); });