Bug 316195 Improve "Show view" dialog
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/handlers/ShowViewDialog.java
import org.eclipse.swt.widgets.Shell;
/**
 * The Show View dialog. The real one is in
 * org.eclipse.ui.internal.dialogs.ShowViewDialog; this is a temporary
 * placeholder as the original dialog brings lots of extra things in.
 */
public class ShowViewDialog extends Dialog {
	private class DescriptorProvider implements IStructuredContentProvider {
		public Object[] getElements(Object inputElement) {
			return ((MApplication) inputElement).getDescriptors().toArray();
		}
		public void dispose() {
		}
		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
		}
	}
	private MPartDescriptor[] selectedDescriptors;
	private MApplication application;
	TableViewer tableViewer;
	public ShowViewDialog(Shell shell, MApplication application) {
		super(shell);
		this.application = application;
	}
	protected void okPressed() {
		IStructuredSelection selection = (IStructuredSelection) tableViewer
				.getSelection();
		ArrayList<MPartDescriptor> tmp = new ArrayList<MPartDescriptor>(
				selection.size());
		for (Iterator<MPartDescriptor> i = selection.iterator(); i.hasNext();) {
			tmp.add(i.next());