void (@NotNull FileSystemTree fileSystemTree, @NotNull AnActionEvent e) { VirtualFile projectPath = getProjectDir(e); boolean enabled = projectPath != null && fileSystemTree.isUnderRoots(projectPath); e.getPresentation().setEnabledAndVisible(enabled); if (enabled) { e.getPresentation().setIcon(ProductIcons.getInstance().getProjectIcon()); } }