Bug 21631 JavaUI.createTypeDialog() should provide default message [dialogs]
2.0 Release If you use JavaUI.createTypeDialog() to create a new (single selection) type dialog, and then open the dialog, the open will fail silently. The dialog cannot be succesfully opened unless you send setMessage() to the dialog before you open it. This behaviour should be documented, or, preferably, a default message ("Please select a type/class/interface") should be provided.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
public static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection, String filter) throws JavaModelException {
		int elementKinds= 0;
		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.setFilter(filter);
			return dialog;			
		} else {
			TypeSelectionDialog dialog= new TypeSelectionDialog(parent, context, elementKinds, scope);
			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