Bug 31473 Search Engine should not search in working copies that aren't on the build path
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* any character and '*' representing any string are supported. Clients can pass an empty 
	 * string if no filtering is required.
	 * @return a new selection dialog
	 * 
	 * @since 2.0
	 */
	public static SelectionDialog createMainTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection, String filter) {
		if (multipleSelection) {
			MultiMainTypeSelectionDialog dialog= new MultiMainTypeSelectionDialog(parent, context, scope, style);
			dialog.setFilter(filter);
			return dialog;
		} else {
			MainTypeSelectionDialog dialog= new MainTypeSelectionDialog(parent, context, scope, style);
			dialog.setFilter(filter);
			return dialog;
		}		
	}
	/**
	 * Creates a selection dialog that lists all types in the given scope containing 
	 * a standard <code>main</code> method.
	 * The caller is responsible for opening the dialog with <code>Window.open</code>,
	 * and subsequently extracting the selected type(s) (of type
	 * <code>IType</code>) via <code>SelectionDialog.getResult</code>.
	 * 
	 * @param parent the parent shell of the dialog to be created
	 * @param context the runnable context used to show progress when the dialog
	 *   is being populated
	 * @param scope the scope that limits which types are included
	 * @param style flags defining the style of the dialog; the only valid values are
	 *   <code>IJavaElementSearchConstants.CONSIDER_BINARIES</code>,