Java Code Examples for org.eclipse.jface.dialogs.MessageDialog.NONE

The following are Jave code examples for showing how to use NONE of the org.eclipse.jface.dialogs.MessageDialog class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: n4js   File: AbstractExportToSingleFileWizardPage.java   Source Code and License Vote up 5 votes
/**
 * Displays a Yes/No question to the user with the specified message and returns the user's response.
 *
 * @param message
 *            the question to ask
 * @return <code>true</code> for Yes, and <code>false</code> for No
 */
private boolean queryYesNoQuestion(String message) {
	MessageDialog dialog = new MessageDialog(getContainer().getShell(),
			IDEWorkbenchMessages.Question,
			(Image) null, message, MessageDialog.NONE,
			new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0) {
		@Override
		protected int getShellStyle() {
			return super.getShellStyle() | SWT.SHEET;
		}
	};
	return dialog.open() == 0;
}