use of org.eclipse.scanning.device.ui.device.EditDetectorModelDialog in project gda-core by openGDA.
the class DetectorsSection method editDetectorParameters.
private void editDetectorParameters(final IScanModelWrapper<IDetectorModel> detectorParameters) {
try {
if (detectorParameters.getModel() instanceof IMalcolmModel && getRunnableDeviceService().getRunnableDevice(detectorParameters.getModel().getName()).getDeviceState() == DeviceState.OFFLINE) {
MessageDialog.openError(getShell(), "Malcolm Device " + detectorParameters.getModel().getName(), "Cannot edit malcolm device " + detectorParameters.getModel().getName() + " as it is offline.");
return;
}
} catch (ScanningException e) {
logger.error("Cannot get malcolm device", e);
}
final Dialog editModelDialog = new EditDetectorModelDialog(getShell(), getRunnableDeviceService(), detectorParameters.getModel(), detectorParameters.getName());
editModelDialog.create();
if (editModelDialog.open() == Window.OK) {
dataBindingContext.updateTargets();
}
}
use of org.eclipse.scanning.device.ui.device.EditDetectorModelDialog in project gda-core by openGDA.
the class FocusScanSetupPage method editDetectorParameters.
private void editDetectorParameters(IScanModelWrapper<IDetectorModel> detectorModelWrapper) {
final EditDetectorModelDialog editDialog = new EditDetectorModelDialog(getShell(), getRunnableDeviceService(), detectorModelWrapper.getModel(), detectorModelWrapper.getName());
editDialog.create();
editDialog.open();
// The dialog updates the model live, using , so we don't have to do anything here
}
Aggregations