void (@NotNull Project project, @NotNull PsiFile file, @Nullable Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { PsiClass myTargetClass = (PsiClass)startElement; PsiMethod method = createMethod(myTargetClass); List<Pair<PsiExpression, PsiType>> arguments = ContainerUtil.map(method.getParameterList().getParameters(), psiParameter -> Pair.create(null, psiParameter.getType())); method = (PsiMethod)JavaCodeStyleManager.getInstance(project).shortenClassReferences(myTargetClass.add(method)); CreateMethodFromUsageFix.doCreate(myTargetClass, method, arguments, PsiSubstitutor.EMPTY, ExpectedTypeInfo.EMPTY_ARRAY, method); }