package jalview.ws2.operations;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletionStage;
{
final var calcName = service.getName();
final var calcManager = frame.getViewport().getCalcManager();
+ final var arguments = new ArrayList<ArgumentI>();
final JCheckBoxMenuItem runItem;
{
// TODO use MessageManager and set tool tip text
String.format("%s calculations", calcName));
runItem.addActionListener((event) -> {
calcManager.removeWorkersForName(calcName);
- var worker = createWorker(Collections.emptyList(), frame, calcManager);
+ var worker = createWorker(arguments, frame, calcManager);
calcManager.registerWorker(worker);
});
parent.add(runItem);
String.format("Edit %s settings", calcName));
_editItem.addActionListener((event) -> {
openEditParamsDialog(service, null, null)
- .thenAcceptAsync((arguments) -> {
+ .thenAcceptAsync((args) -> {
if (arguments != null)
{
+ arguments.clear();
+ arguments.addAll(args);
calcManager.removeWorkersForName(calcName);
var worker = createWorker(arguments, frame, calcManager);
calcManager.registerWorker(worker);