void (@NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file) { PsiClass aClass = OverrideImplementUtil.getContextClass(project, editor, file, true); if (aClass == null) return; ReadAction.nonBlocking(() -> { boolean empty = OverrideImplementExploreUtil.getMethodSignaturesToOverride(aClass).isEmpty(); if (empty) { return null; } return OverrideImplementUtil.prepareChooser(aClass, false); }) .finishOnUiThread(ModalityState.defaultModalityState(), container -> { if (container==null) { HintManager.getInstance().showErrorHint(editor, JavaBundle.message("override.methods.error.no.methods")); } else { OverrideImplementUtil.showAndPerform(project, editor, aClass, false, container); } }) .expireWhen(() -> !aClass.isValid()) .submit(AppExecutorUtil.getAppExecutorService()); }