String () { StringBuilder builder = new StringBuilder("\n\n\n"); builder.append("Language: ") .append(myLang.getDisplayName()) .append(". Setting: ") .append(mySettingsType) .append(". Errors found: ") .append(myErrors.size()) .append('\n'); for (PsiErrorElement error : myErrors) { builder.append(" ") .append(error.getErrorDescription()) .append(". Previous sibling: ") .append(error.getPrevSibling()) .append('\n'); } builder.append("\nCode sample:\n") .append(myCode) .append('\n'); return builder.toString(); }