private static @Nullable JavaOverrideImplementMemberChooserContainer prepareJavaOverrideImplementChooser(@NotNull PsiElement aClass,
                                                                                                           boolean toImplement,
                                                                                                           @NotNull Collection<CandidateInfo> candidates,
                                                                                                           @NotNull Collection<CandidateInfo> secondary) {
    Computable<JavaOverrideImplementMemberChooserContainer> computable = () -> {
      if (toImplement) {
        for (Iterator<CandidateInfo> iterator = candidates.iterator(); iterator.hasNext(); ) {
          CandidateInfo candidate = iterator.next();
          PsiElement element = candidate.getElement();
          if (element instanceof PsiMethod && ((PsiMethod)element).hasModifierProperty(PsiModifier.DEFAULT)) {
            iterator.remove();
            secondary.add(candidate);
          }
        }
      }

      return prepare(aClass, toImplement, candidates, secondary);
    };
    if (EDT.isCurrentThreadEdt()) {
      return ActionUtil.underModalProgress(aClass.getProject(),
                                           CodeInsightBundle.message("progress.title.resolving.reference"), computable);
    }
    else {
      return computable.get();
    }
  }
private static @Nullable JavaOverrideImplementMemberChooserContainer prepareJavaOverrideImplementChooser(@NotNull PsiElement aClass,
                                                                                                           boolean toImplement,
                                                                                                           @NotNull Collection<CandidateInfo> candidates,
                                                                                                           @NotNull Collection<CandidateInfo> secondary)