final IWorkbenchPage page = window.getActivePage();
if (page == null) {
return;
}
final ShowViewDialog dialog = new ShowViewDialog(window,
WorkbenchPlugin.getDefault().getViewRegistry());
dialog.open();
if (dialog.getReturnCode() == Window.CANCEL) {
return;
}
final IViewDescriptor[] descriptors = dialog.getSelection();
for (int i = 0; i < descriptors.length; ++i) {
try {
openView(descriptors[i].getId(), window);
} catch (PartInitException e) {
StatusUtil.handleStatus(e.getStatus(),