String (@NotNull PsiElement element) { final VirtualFile file; if (element instanceof PsiFileSystemItem) { file = ((PsiFileSystemItem)element).getVirtualFile(); } else { file = element.getContainingFile().getVirtualFile(); } if (file != null) { return FileUtil.toSystemDependentName(file.getPath()); } return null; }