package rhogenwizard;

import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.ui.PlatformUI;

public class DialogUtils
{
    public static void warning(final String title, final String message)
    {
        PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable()
        {
            @Override
            public void run()
            {
                MessageDialog.openWarning(null, title, message);
            }
        });
    }

    public static void error(final String title, final String message)
    {
        PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable()
        {
            @Override
            public void run()
            {
                MessageDialog.openError(null, title, message);
            }
        });
    }

    public static boolean confirm(final String title, final String message)
    {
        final boolean ok[] = new boolean[1];

        PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable()
        {
            @Override
            public void run()
            {
                ok[0] = MessageDialog.openConfirm(null, title, message);
            }
        });

        return ok[0];
    }
}

@@ -1145,16 +1145,426 @@
    %7D);%0A%0A
+        return ok%5B0%5D;%0A    %7D%0A    %0A    public static boolean quetsion(final String title, final String message)%0A    %7B%0A        final boolean ok%5B%5D = new boolean%5B1%5D;%0A%0A        PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable()%0A        %7B%0A            @Override%0A            public void run()%0A            %7B%0A                ok%5B0%5D = MessageDialog.openQuestion(null, title, message);%0A            %7D%0A        %7D);%0A%0A
         

add question dialog