Result (@NotNull String line, int entireLength) { int afterLineNumberIndex = line.indexOf(": "); // end of file_name_and_line_number sequence if (afterLineNumberIndex == -1) { return null; } String fileAndLineNumber = line.substring(0, afterLineNumberIndex); int index = fileAndLineNumber.lastIndexOf(':'); if (index == -1) { return null; } final String fileName = fileAndLineNumber.substring(0, index); String lineNumberStr = fileAndLineNumber.substring(index + 1).trim(); int lineNumber; try { lineNumber = Integer.parseInt(lineNumberStr); } catch (NumberFormatException e) { return null; } final VirtualFile file = LocalFileSystem.getInstance().findFileByPath(fileName.replace(File.separatorChar, '/')); if (file == null) { return null; } int textStartOffset = entireLength - line.length(); int highlightEndOffset = textStartOffset + afterLineNumberIndex; OpenFileHyperlinkInfo info = new OpenFileHyperlinkInfo(myProject, file, lineNumber - 1); return new Result(textStartOffset, highlightEndOffset, info); }