Arrays.asList(actionPanel.getJvmArguments()),
actionPanel.isNonBlocking());
}
private String doSaveTask(CustomActionPanel actionPanel) {
AddNewTaskPanel panel = new AddNewTaskPanel();
DialogDescriptor dlgDescriptor = new DialogDescriptor(
panel,
NbStrings.getAddNewTaskDlgTitle(),
true,
new Object[]{DialogDescriptor.OK_OPTION, DialogDescriptor.CANCEL_OPTION},
DialogDescriptor.OK_OPTION,
DialogDescriptor.BOTTOM_ALIGN,
null,
null);
Dialog dlg = DialogDisplayer.getDefault().createDialog(dlgDescriptor);
dlg.pack();
dlg.setVisible(true);
if (dlgDescriptor.getValue() != DialogDescriptor.OK_OPTION) {
return null;
}
String displayName = panel.getDisplayName();
if (displayName.isEmpty()) {
return null;
}
PredefinedTask newTaskDef = createTaskDef(actionPanel, displayName, true);