void (@NotNull final AnActionEvent e) { if (myTree.getSelectionPaths() == null || myTree.getSelectionPaths().length != 1) { e.getPresentation().setEnabled(false); } else { e.getPresentation().setEnabled(getSelectedObject() instanceof Artifact); } }