diff options
| author | Lars Vogel | 2015-07-28 16:37:50 +0000 |
|---|---|---|
| committer | Lars Vogel | 2015-07-28 21:22:09 +0000 |
| commit | d012cf07474b285ef91464e72d219fed7cc91139 (patch) | |
| tree | 139777b908a750c1b321509ebc1b2ad30941f9f5 | |
| parent | e1a952fca848cf95176da98b32aebf245cdf70f2 (diff) | |
| download | eclipse.platform.ui-d012cf07474b285ef91464e72d219fed7cc91139.tar.gz eclipse.platform.ui-d012cf07474b285ef91464e72d219fed7cc91139.tar.xz eclipse.platform.ui-d012cf07474b285ef91464e72d219fed7cc91139.zip | |
Bug 472690 - Allow construction of MessageDialog with varargs
Updated the Javadoc reference and the internal usage of the
MessageDialog constructore in the open method
Change-Id: Iea01c3c03540487f6689c233584eb4a2199c2247
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
| -rw-r--r-- | bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java index 7a77d1b2b04..398abad725b 100644 --- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java +++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java @@ -36,42 +36,46 @@ import org.eclipse.swt.widgets.Shell; */ public class MessageDialog extends IconAndMessageDialog { /** - * Constant for no image (value 0). - * - * @see #MessageDialog(Shell, String, Image, String, int, String[], int) - */ + * Constant for no image (value 0). + * + * @see #MessageDialog(Shell, String, Image, String, int, int, String...) + */ public final static int NONE = 0; /** - * Constant for the error image, or a simple dialog with the error image and a single OK button (value 1). - * - * @see #MessageDialog(Shell, String, Image, String, int, String[], int) - * @see #open(int, Shell, String, String, int) - */ + * Constant for the error image, or a simple dialog with the error image and + * a single OK button (value 1). + * + * @see #MessageDialog(Shell, String, Image, String, int, int, String...) + * @see #open(int, Shell, String, String, int) + */ public final static int ERROR = 1; /** - * Constant for the info image, or a simple dialog with the info image and a single OK button (value 2). - * - * @see #MessageDialog(Shell, String, Image, String, int, String[], int) - * @see #open(int, Shell, String, String, int) - */ + * Constant for the info image, or a simple dialog with the info image and a + * single OK button (value 2). + * + * @see #MessageDialog(Shell, String, Image, String, int, int, String...) + * @see #open(int, Shell, String, String, int) + */ public final static int INFORMATION = 2; /** - * Constant for the question image, or a simple dialog with the question image and Yes/No buttons (value 3). - * - * @see #MessageDialog(Shell, String, Image, String, int, String[], int) - * @see #open(int, Shell, String, String, int) - */ + * Constant for the question image, or a simple dialog with the question + * image and Yes/No buttons (value 3). + * + * @see #MessageDialog(Shell, String, Image, String, int, int, String...) + * @see #open(int, Shell, String, String, int) + */ public final static int QUESTION = 3; /** - * Constant for the warning image, or a simple dialog with the warning image and a single OK button (value 4). - * - * @see #MessageDialog(Shell, String, Image, String, int, String[], int) - * @see #open(int, Shell, String, String, int) - */ + * Constant for the warning image, or a simple dialog with the warning image + * and a single OK button (value 4). + * + * @see #MessageDialog(Shell, String, Image, String, int, int, String...) + * @see #open(int, Shell, String, String, int) + */ public final static int WARNING = 4; /** @@ -172,10 +176,9 @@ public class MessageDialog extends IconAndMessageDialog { * the index in the button label array of the default button * */ - public MessageDialog(Shell parentShell, String dialogTitle, - Image dialogTitleImage, String dialogMessage, int dialogImageType, - String[] dialogButtonLabels, int defaultIndex) { - super(parentShell); + public MessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, + int dialogImageType, String[] dialogButtonLabels, int defaultIndex) { + super(parentShell); init(dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, defaultIndex, dialogButtonLabels); } @@ -415,7 +418,7 @@ public class MessageDialog extends IconAndMessageDialog { * @since 3.5 */ public static boolean open(int kind, Shell parent, String title, String message, int style) { - MessageDialog dialog = new MessageDialog(parent, title, null, message, kind, getButtonLabels(kind), 0); + MessageDialog dialog = new MessageDialog(parent, title, null, message, kind, 0, getButtonLabels(kind)); style &= SWT.SHEET; dialog.setShellStyle(dialog.getShellStyle() | style); return dialog.open() == 0; |
