String (@NotNull DataContext dataContext) { Project project = CommonDataKeys.PROJECT.getData(dataContext); final VirtualFile baseDir = project == null ? null : project.getBaseDir(); if (baseDir == null) { return null; } VirtualFile file = CommonDataKeys.VIRTUAL_FILE.getData(dataContext); if (file == null) return null; return FileUtil.getRelativePath(VfsUtil.virtualToIoFile(baseDir), VfsUtil.virtualToIoFile(file)); }