use of org.yamcs.studio.core.model.ManagementCatalogue in project yamcs-studio by yamcs.
the class CreateReplayDialog method okPressed.
@Override
protected void okPressed() {
getButton(IDialogConstants.OK_ID).setEnabled(false);
ClientInfo ci = ManagementCatalogue.getInstance().getCurrentClientInfo();
CreateProcessorRequest req = toCreateProcessorRequest(ci);
ManagementCatalogue catalogue = ManagementCatalogue.getInstance();
catalogue.createProcessorRequest(ci.getInstance(), req).whenComplete((data, exc) -> {
if (exc == null) {
Display.getDefault().asyncExec(() -> {
CreateReplayDialog.super.okPressed();
});
} else {
log.log(Level.SEVERE, "Could not start replay", exc);
Display.getDefault().asyncExec(() -> {
MessageDialog.openError(Display.getCurrent().getActiveShell(), "Could not start replay", exc.getMessage());
getButton(IDialogConstants.OK_ID).setEnabled(true);
});
}
});
}
Aggregations