}
if (selectedDeviceIdentification != null) {
selectedDeviceIdentification.removeChangeListener(
odomChangeListener);
}
ODOMElementSelection selection = event.getSelection();
if (selection.isEmpty()) {
// ensure the selectedDevice and
// selectedDeviceIndentification fields are set to
// null to reflect the fact that no device is selected
selectedDevice = null;
selectedDeviceIdentification = null;
listBuilder.setEnabled(false);
} else {
// update the selectedDevice and
// selectedDeviceIndentification fields
selectedDevice =
(ODOMElement) selection.getFirstElement();
selectedDevice.addChangeListener(odomChangeListener);
selectedDeviceIdentification =
(ODOMElement) context.
getDeviceRepositoryAccessorManager().
retrieveDeviceTACElement(getSelectedDeviceName());