Collection<String> (PsiFile psi) { //TODO: NotNull? if (!PsiTreeUtil.hasErrorElements(psi)) { return Collections.emptyList(); } return Collections2.transform(PsiTreeUtil.findChildrenOfType(psi, PsiErrorElement.class), input -> input.getErrorDescription()); }