/*
   * @see org.openide.util.actions.SystemAction#getName()
   */
  @Override
  public String getName() {
    for (final Node node : nodes)
      if (node.getClass().equals(PackageNode.class))
        return Messages.getString("updateAction.getName"); // $NON-NLS-1$

    return null;
  }
Exemplo n.º 2
0
 private static void disableCreateCategoryAction(Node proxyRootNode) {
   ResourceBundle bundle = NbBundle.getBundle(proxyRootNode.getClass());
   if (bundle != null) {
     String createCategoryName = null;
     try {
       createCategoryName = bundle.getString("CTL_CreateCategory"); // NOI18N
     } catch (MissingResourceException e) {
       // Cannot disable the action, it's key name may have changed.
       // We must be aware of this and visibly fail so development
       // can update the key name.
       ErrorManager.getDefault().notify(e);
       return;
     }
     if (createCategoryName != null) {
       disableActionByName(proxyRootNode, createCategoryName);
       for (Node childProxyNode : proxyRootNode.getChildren().getNodes()) {
         disableActionByName(childProxyNode, createCategoryName);
       }
     }
   }
 }