public @Nullable String getURL() {
    final PsiElement element = getPsiElement();
    if (element == null || !element.isPhysical()) return null;
    final PsiFileSystemItem containingFile = element instanceof PsiFileSystemItem
                                             ? (PsiFileSystemItem) element
                                             : element.getContainingFile();
    if (containingFile == null) return null;
    final VirtualFile virtualFile = containingFile.getVirtualFile();
    if (virtualFile == null) return null;
    return element instanceof PsiFileSystemItem
           ? virtualFile.getUrl()
           : virtualFile.getUrl() + "#" + element.getTextOffset();
  }
public @Nullable String getURL()