void (@NotNull Editor editor, @NotNull PsiElement aClass, final boolean toImplement, @NotNull Collection<CandidateInfo> candidates, @NotNull Collection<CandidateInfo> secondary, @NotNull java.util.function.Consumer<JavaOverrideImplementMemberChooser> callback) { ReadAction.nonBlocking(() -> { return prepareJavaOverrideImplementChooser(aClass, toImplement, candidates, secondary); }) .finishOnUiThread(ModalityState.defaultModalityState(), container -> { JavaOverrideImplementMemberChooser chooser = showJavaOverrideImplementChooser(container, editor, aClass); callback.accept(chooser); }) .expireWhen(() -> !aClass.isValid()) .submit(AppExecutorUtil.getAppExecutorService()); }