Skip to content

Commit

Permalink
Fix for completing annotation attribute names; favorites aren't relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Dec 29, 2018
1 parent d6fa240 commit 6d35437
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ private void generateAnnotationMemberValueProposals(List<ICompletionProposal> 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<ClassNode> completionTypes = new ArrayList<>(2);
if (context.containingDeclaration instanceof ClassNode) {
Expand Down Expand Up @@ -216,9 +218,6 @@ private String getPerceivedCompletionMember() {

private <T extends AbstractProposalCreator> 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);
});
Expand Down

0 comments on commit 6d35437

Please sign in to comment.