void (final Project project, final Editor editor, final PsiClass targetClass) { PsiMethodMember[] constructors = calculateConstructors(targetClass); LOG.assertTrue(constructors.length >=1); // Otherwise we won't have been messing with all this stuff boolean isCopyJavadoc; if (constructors.length > 1 && !ApplicationManager.getApplication().isUnitTestMode()) { MemberChooser<PsiMethodMember> chooser = new MemberChooser<>(constructors, false, true, project); chooser.setTitle(QuickFixBundle.message("super.class.constructors.chooser.title")); chooser.show(); if (chooser.getExitCode() != DialogWrapper.OK_EXIT_CODE) return; constructors = chooser.getSelectedElements(new PsiMethodMember[0]); isCopyJavadoc = chooser.isCopyJavadoc(); } else { isCopyJavadoc = true; } final PsiMethodMember[] constructors1 = constructors; ApplicationManager.getApplication().runWriteAction ( () -> { insertConstructor(project, editor, targetClass, isCopyJavadoc, constructors1); UndoUtil.markPsiFileForUndo(targetClass.getContainingFile()); } ); }