void (PsiClass psiClass, Project project, @NotNull PsiClass targetClass, Editor editor, boolean showChooser) { boolean hasNonTrivialConstructor = false; final PsiMethod[] constructors = psiClass.getConstructors(); outer: for (PsiMethod constructor : constructors) { if (!constructor.getParameterList().isEmpty()) { hasNonTrivialConstructor = true; break; } PsiClassType[] types = constructor.getThrowsList().getReferencedTypes(); for (PsiClassType type : types) { if (!ExceptionUtil.isUncheckedException(type)) { hasNonTrivialConstructor = true; break outer; } } } if (hasNonTrivialConstructor) { final int offset = editor.getCaretModel().getOffset(); CreateConstructorMatchingSuperFix.chooseConstructor2Delegate(project, editor, targetClass); editor.getCaretModel().moveToOffset(offset); } if (psiClass.hasModifierProperty(PsiModifier.SEALED)) { PsiIdentifier targetNameIdentifier = Objects.requireNonNull(targetClass.getNameIdentifier()); editor.getCaretModel().moveToOffset(targetNameIdentifier.getTextRange().getStartOffset()); } if (showChooser) OverrideImplementUtil.chooseAndImplementMethods(project, editor, targetClass); }