PsiComment (PsiFile aFile) { PsiComment comment = PsiTreeUtil.findChildOfType(aFile, PsiComment.class); if (comment == null) { throw new IncorrectOperationException("Incorrect comment \"" + aFile.getText() + "\"."); } DummyHolderFactory.createHolder(myManager, (TreeElement)SourceTreeToPsiMap.psiElementToTree(comment), null); return comment; }