void (@NotNull HyperlinkEvent e) { URL url = e.getURL(); if (url == null) { return; } @NonNls String ref = url.getRef(); int offset = Integer.parseInt(ref); String fileURL = url.toExternalForm(); fileURL = fileURL.substring(0, fileURL.indexOf('#')); VirtualFile vFile = VirtualFileManager.getInstance().findFileByUrl(fileURL); if (vFile == null) { vFile = VfsUtil.findFileByURL(url); } if (vFile != null) { Navigatable descriptor = PsiNavigationSupport.getInstance().createNavigatable(project, vFile, offset); descriptor.navigate(true); } }