new DeviceHierarchyLabelProvider());
// set the title for the dialog
dialog.setTitle(SELECT_DEVICE_TITLE);
// display the dialog
dialog.open();
// retrieve the selected device
Object[] result = dialog.getResult();
// if the result is null then the user pressed the cancel
// button. However, if it is non null then a selection will
// have been made and the result array should contain 1