PsiErrorElement (PsiFile file, int offset, String description) { final List<PsiErrorElement> errorList = ERRORS.get(file, findErrors(file)); for (PsiErrorElement element : errorList) { if (element.getTextOffset() == offset && description.equals(element.getErrorDescription())) { return element; } } return null; }