template.getJvmArguments());
}
@Override
public void actionPerformed(ActionEvent e) {
GradleTaskDef lastSource = getLastSourceTask();
AsyncGradleTask task = getLastTask();
if (task != null && lastSource != null) {
CustomActionPanel panel = new CustomActionPanel(false);
panel.updatePanel(toPredefined(lastSource));
DialogDescriptor dlgDescriptor = new DialogDescriptor(
panel,
NbStrings.getCustomTaskDlgTitle(),
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;
}
GradleCommandTemplate template
= panel.tryGetGradleCommand(lastSource.getCommandName());
AsyncGradleTask newTask = new AsyncGradleTask(
task.getProject(),
adjust(task.getTaskDefFactroy(), template),
task.getListener());
newTask.run();