while((editor=workbenchPage.getActiveEditor()) != null) {
if(editor instanceof MultiPageEditorPart) break;
workbenchPage.closeEditor(editor,false);
}
DeviceEditor deviceEditor = (DeviceEditor) workbenchPage.
openEditor(new FileEditorInput(matchedFile),
defaultEditorDescriptor.getId(), true);
deviceEditor.selectDevice(match.getDeviceName());
} catch (PartInitException e) {
EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
}
}