String (@NotNull Project project, @NotNull List<String> lines) { String text = lines.get(0); int index = 0; if (text.charAt(0) == '"') { index = text.indexOf('"', 1) + 1; } if (index == 0) { boolean nonWhiteSpaceFound = false; for (; index < text.length(); index++) { char c = text.charAt(index); if (c != ' ' && c != '\t') { nonWhiteSpaceFound = true; continue; } if (nonWhiteSpaceFound) { break; } } } assert index <= text.length(); return text.substring(0, index) + " ..."; }