VirtualFile (@NotNull List<? extends RangeHighlighter> links) { RangeHighlighter key = ContainerUtil.getLastItem(links); if (key == null) return null; HyperlinkInfo info = EditorHyperlinkSupport.getHyperlinkInfo(key); if (!(info instanceof FileHyperlinkInfo)) return null; OpenFileDescriptor descriptor = ((FileHyperlinkInfo)info).getDescriptor(); return descriptor != null ? descriptor.getFile() : null; }