eclipse plugin: showMessageBox now can receive a style mask
This commit is contained in:
parent
074b7771a3
commit
2392e8ac80
1 changed files with 12 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
*/
|
||||
package wesnoth_eclipse_plugin.utils;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.MessageBox;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
|
||||
|
@ -14,6 +15,16 @@ public class GUIUtils
|
|||
* @param message the message to print
|
||||
*/
|
||||
public static void showMessageBox(final IWorkbenchWindow window,final String message)
|
||||
{
|
||||
showMessageBox(window, message,SWT.DEFAULT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a message box with the specified message (thread-safe)
|
||||
* @param window the window where to show the message box
|
||||
* @param message the message to print
|
||||
*/
|
||||
public static void showMessageBox(final IWorkbenchWindow window,final String message,final int style)
|
||||
{
|
||||
if (window == null || window.getShell() == null)
|
||||
return;
|
||||
|
@ -23,7 +34,7 @@ public class GUIUtils
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
MessageBox box = new MessageBox(window.getShell());
|
||||
MessageBox box = new MessageBox(window.getShell(), style);
|
||||
box.setMessage(message);
|
||||
box.open();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue