package jalview.ws2.operations;
-import java.io.IOException;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
-import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletionStage;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import jalview.api.AlignmentViewPanel;
-import jalview.bin.Cache;
import jalview.datamodel.AlignmentAnnotation;
import jalview.gui.AlignFrame;
import jalview.gui.AlignViewport;
import jalview.gui.WsJobParameters;
-import jalview.io.AnnotationFile;
import jalview.io.FeaturesFile;
-import jalview.util.MathUtils;
import jalview.util.MessageManager;
-import jalview.workers.AlignCalcManager2;
import jalview.ws.params.ArgumentI;
import jalview.ws.params.WsParamSetI;
import jalview.ws2.MenuEntryProviderI;
import jalview.ws2.ResultSupplier;
-import jalview.ws2.WSJob;
-import jalview.ws2.WSJobStatus;
import jalview.ws2.PollingTaskExecutor;
import jalview.ws2.WebServiceI;
-import jalview.ws2.WebServiceWorkerI;
-import jalview.ws2.utils.WSJobList;
-
-import static java.lang.String.format;
/**
- *
+ *
* @author mmwarowny
*
*/
final ResultSupplier<FeaturesFile> featuresSupplier;
+ boolean alignmentAnalysis = false;
+
+ boolean interactive = false;
+
public AnnotationOperation(WebServiceI service,
ResultSupplier<List<AlignmentAnnotation>> annotSupplier,
ResultSupplier<FeaturesFile> featSupplier, String operationName)
@Override
public boolean isInteractive()
{
- return false;
+ return interactive;
+ }
+
+ public void setInteractive(boolean value)
+ {
+ this.interactive = value;
}
@Override
public boolean isAlignmentAnalysis()
{
- return false;
+ return alignmentAnalysis;
+ }
+
+ public void setAlignmentAnalysis(boolean value)
+ {
+ this.alignmentAnalysis = value;
}
@Override
var worker = new AnnotationServiceWorker(this, service,
Collections.emptyList(), viewport, alignPanel, frame, frame,
calcManager);
- calcManager.startWorker(worker);
- // TODO create and submit AnnotataionServiceWorker
+ if (isInteractive())
+ calcManager.registerWorker(worker);
+ else
+ calcManager.startWorker(worker);
});
parent.add(item);
}
var worker = new AnnotationServiceWorker(
AnnotationOperation.this, service, arguments, viewport,
alignPanel, frame, frame, calcManager);
- calcManager.startWorker(worker);
+ if (isInteractive())
+ calcManager.registerWorker(worker);
+ else
+ calcManager.startWorker(worker);
}
});
});
+ parent.add(item);
}
}