Search in sources :

Example 1 with MalcolmModelEditor

use of org.eclipse.scanning.device.ui.device.MalcolmModelEditor in project gda-core by openGDA.

the class TimeSeriesScanView method createMalcolmModelEditor.

private MalcolmModelEditor createMalcolmModelEditor(Composite parent, String malcolmDeviceName) {
    try {
        final IRunnableDevice<?> malcolmDevice = getRunnableDeviceService().getRunnableDevice(malcolmDeviceName);
        final IMalcolmModel malcolmModel = (IMalcolmModel) malcolmDevice.getModel();
        final MalcolmModelEditor editor = new MalcolmModelEditor(getRunnableDeviceService(), malcolmModel);
        editor.createEditorPart(parent);
        return editor;
    } catch (ScanningException e) {
        logger.error("Could not get malcolm device: ", malcolmDeviceName, e);
        return null;
    }
}
Also used : ScanningException(org.eclipse.scanning.api.scan.ScanningException) IMalcolmModel(org.eclipse.scanning.api.device.models.IMalcolmModel) MalcolmModelEditor(org.eclipse.scanning.device.ui.device.MalcolmModelEditor)

Aggregations

IMalcolmModel (org.eclipse.scanning.api.device.models.IMalcolmModel)1 ScanningException (org.eclipse.scanning.api.scan.ScanningException)1 MalcolmModelEditor (org.eclipse.scanning.device.ui.device.MalcolmModelEditor)1