CreateMethodQuickFix (@NotNull PsiClass targetClass, @NonNls final String signature, @NonNls final String body) { CreateMethodQuickFix fix = new CreateMethodQuickFix(targetClass, signature, body); try { fix.createMethod(targetClass); return fix; } catch (IncorrectOperationException e) { return null; } }