void () { nonBlocking( project, () -> { try { return ExtractableAnalysisUtilKt.validate(currentDescriptor); } catch (RuntimeException e) { return new ExtractableCodeDescriptorWithException(e); } }, result -> { if (result instanceof ExtractableCodeDescriptorWithException) { throw ((ExtractableCodeDescriptorWithException) result).getException(); } MultiMap<PsiElement, String> conflicts = ((ExtractableCodeDescriptorWithConflicts) result).getConflicts(); conflicts.values().removeAll(originalDescriptor.getConflicts().values()); KotlinRefactoringUtilKt.checkConflictsInteractively( project, conflicts, new Function0<>() { @Override public Unit invoke() { close(OK_EXIT_CODE); return Unit.INSTANCE; } }, new Function0<>() { @Override public Unit invoke() { KotlinExtractFunctionDialog.super.doOKAction(); return onAccept.invoke(KotlinExtractFunctionDialog.this); } } ); return Unit.INSTANCE; }); }