void (PsiMember member) { final PsiElement child = member.getFirstChild(); if (child instanceof PsiDocComment) { final Project project = member.getProject(); final GrDocComment groovyDoc = GroovyPsiElementFactory.getInstance(project).createDocCommentFromText(child.getText()); child.delete(); CodeStyleManager.getInstance(project).reformat(member); member.getParent().addBefore(groovyDoc, member); } }