private PsiDocComment updateJavaDocAction(T element, PsiDocComment oldDocComment) { PsiDocComment result = null; JavaDoc newJavaDoc = generateJavaDoc(element); JavaDoc oldJavaDoc = JavaDocUtils.createJavaDoc(oldDocComment); if (newJavaDoc != null) { newJavaDoc = JavaDocUtils.mergeJavaDocs(oldJavaDoc, newJavaDoc); String javaDoc = newJavaDoc.toJavaDoc(); result = psiElementFactory.createDocCommentFromText(javaDoc); } return result; }