String (int lineNumber, boolean asHtml) { if (myLines.size() <= lineNumber || lineNumber < 0) { return null; } HgAnnotationLine info = myLines.get(lineNumber); if (info == null) { return null; } HgFileRevision revision = ContainerUtil.find(myFileRevisions, it -> it.getRevisionNumber().equals(info.getVcsRevisionNumber())); if (revision == null) return null; AnnotationTooltipBuilder atb = new AnnotationTooltipBuilder(myProject, asHtml); atb.appendRevisionLine(revision.getRevisionNumber(), null); atb.appendLine(HgBundle.message("hg4idea.annotation.author", revision.getAuthor())); atb.appendLine(HgBundle.message("hg4idea.annotation.date", revision.getRevisionDate())); String message = revision.getCommitMessage(); if (message != null) atb.appendCommitMessageBlock(message); return atb.toString(); }