Exemplo n.º 1
0
  public void performAction(Node[] activatedNodes) {
    Node n = activatedNodes[0];
    Folder folder = (Folder) n.getValue("Folder"); // NOI18N
    assert folder != null;
    Node thisNode = (Node) n.getValue("This"); // NOI18N
    assert thisNode != null;
    Project project = (Project) n.getValue("Project"); // NOI18N
    assert project != null;

    ConfigurationDescriptorProvider pdp =
        project.getLookup().lookup(ConfigurationDescriptorProvider.class);
    MakeConfigurationDescriptor makeConfigurationDescriptor = pdp.getConfigurationDescriptor();
    if (!makeConfigurationDescriptor.okToChange()) {
      return;
    }

    NotifyDescriptor.InputLine dlg =
        new NotifyDescriptor.InputLine(getString("FolderNameTxt"), getString("NewFolderName"));
    dlg.setInputText(folder.suggestedNewFolderName());
    String newname = null;

    if (NotifyDescriptor.OK_OPTION.equals(DialogDisplayer.getDefault().notify(dlg))) {
      newname = dlg.getInputText();
    } else {
      return;
    }

    Folder newFolder = folder.addNewFolder(true);
    newFolder.setDisplayName(newname);
    MakeLogicalViewProvider.setVisible(project, newFolder);
  }
 /**
  * Implementation of ActionListener interface. Called when some action buttons (ok, cancel here)
  * are pressed.
  */
 public void actionPerformed(ActionEvent evt) {
   if (NotifyDescriptor.OK_OPTION.equals(evt.getSource())) {
     boolean result = restoreArchive();
     if (!result) {
       return;
     }
   }
   packagingPanel.historyDialog.setVisible(false);
 }
Exemplo n.º 3
0
 private void includeExcludeButtonActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_includeExcludeButtonActionPerformed
   IncludeExcludeVisualizer v = new IncludeExcludeVisualizer();
   uiProperties.loadIncludesExcludes(v);
   DialogDescriptor dd =
       new DialogDescriptor(
           v.getVisualizerPanel(),
           NbBundle.getMessage(CustomizerSources.class, "CustomizerSources.title.includeExclude"));
   dd.setOptionType(NotifyDescriptor.OK_CANCEL_OPTION);
   if (NotifyDescriptor.OK_OPTION.equals(DialogDisplayer.getDefault().notify(dd))) {
     uiProperties.storeIncludesExcludes(v);
   }
 } // GEN-LAST:event_includeExcludeButtonActionPerformed