@Override
      protected void addCompletions(@NotNull final CompletionParameters params,
                                    @NotNull ProcessingContext context,
                                    @NotNull final CompletionResultSet result) {
        final PsiElement position = params.getPosition();
        if (position.getParent() instanceof GrLiteral) return;

        if (isInDefaultAnnotationNameValuePair(position)) return;

        final Set<TypeConstraint> infos = getExpectedTypeInfos(params);

        final PsiElement reference = position.getParent();
        if (reference == null) return;
        if (reference instanceof GrReferenceElement) {
          GroovyCompletionUtil.processVariants((GrReferenceElement)reference, result.getPrefixMatcher(), params,
                                               variant -> {
                                                 PsiType type = null;

                                                 Object o = variant.getObject();
                                                 if (o instanceof GroovyResolveResult) {
                                                   if (!((GroovyResolveResult)o).isAccessible()) return;
                                                   o = ((GroovyResolveResult)o).getElement();
                                                 }

                                                 if (o instanceof PsiElement) {
                                                   type = getTypeByElement((PsiElement)o, position);
                                                 }
                                                 else if (o instanceof String) {
                                                   if ("true".equals(o) || "false".equals(o)) {
                                                     type = PsiTypes.booleanType();
                                                   }
                                                 }
                                                 if (type == null) return;
                                                 for (TypeConstraint info : infos) {
                                                   if (info.satisfied(type, position)) {
                                                     result.addElement(variant);
                                                     break;
                                                   }
                                                 }
                                               });
        }

        addExpectedClassMembers(params, new FastGroovyCompletionConsumer(result));
      }
@Override
      protected void addCompletions(@NotNull final CompletionParameters params,
                                    @NotNull ProcessingContext context,
                                    @NotNull final CompletionResultSet result)