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