Result (@NotNull final String line, final int entireLength) { if (!line.endsWith(".java\n")) { return null; } try { final Matcher matcher = PATTERN.matcher(line); if (matcher.matches()) { final String method = matcher.group(1); final int lineNumber = Integer.parseInt(matcher.group(2)); final String fileName = matcher.group(3); final int textStartOffset = entireLength - line.length(); final PsiShortNamesCache cache = PsiShortNamesCache.getInstance(myProject); final PsiFile[] psiFiles = cache.getFilesByName(fileName); if (psiFiles.length == 0) return null; final HyperlinkInfo info = psiFiles.length == 1 ? new OpenFileHyperlinkInfo(myProject, psiFiles[0].getVirtualFile(), lineNumber - 1) : new MyHyperlinkInfo(psiFiles); return new Result(textStartOffset + matcher.start(2), textStartOffset + matcher.end(3), info); } } catch (NumberFormatException e) { LOG.debug(e); } return null; }