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
if (style == IJavaElementSearchConstants.CONSIDER_TYPES) {
			elementKinds= IJavaSearchConstants.TYPE;
		} else if (style == IJavaElementSearchConstants.CONSIDER_INTERFACES) {
			elementKinds= IJavaSearchConstants.INTERFACE;
		} else if (style == IJavaElementSearchConstants.CONSIDER_CLASSES) {
			elementKinds= IJavaSearchConstants.CLASS;
		} else {
			Assert.isTrue(false, "illegal style"); 
		}
		if (multipleSelection) {
			MultiTypeSelectionDialog dialog= new MultiTypeSelectionDialog(parent, context, elementKinds, scope);
			dialog.setMessage(JavaUIMessages.getString("JavaUI.defaultDialogMessage")); 
			dialog.setFilter(filter);
			return dialog;			
		} else {
			TypeSelectionDialog dialog= new TypeSelectionDialog(parent, context, elementKinds, scope);
			dialog.setMessage(JavaUIMessages.getString("JavaUI.defaultDialogMessage")); 
			dialog.setFilter(filter);
			return dialog;
		}
	}
	/**
	 * Creates a selection dialog that lists all types in the given scope.
	 * 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