Author: rob.stryker(a)jboss.com
Date: 2011-11-04 10:52:31 -0400 (Fri, 04 Nov 2011)
New Revision: 36173
Modified:
branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-9953 - to m4 branch
Modified:
branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
---
branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2011-11-04
13:02:39 UTC (rev 36172)
+++
branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2011-11-04
14:52:31 UTC (rev 36173)
@@ -6,10 +6,9 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
@@ -89,19 +88,32 @@
final boolean[] b = new boolean[1];
Display.getDefault().syncExec(new Runnable() {
public void run() {
- MessageBox messageBox = new MessageBox(new Shell(), SWT.ICON_QUESTION | SWT.YES |
SWT.NO);
- messageBox.setMessage(message);
- messageBox.setText(title);
- int response = messageBox.open();
- if (response == SWT.YES)
- b[0] = true;
- else
- b[0] = false;
+// MessageBox messageBox = new MessageBox(new Shell(), SWT.ICON_QUESTION | SWT.YES |
SWT.NO);
+// messageBox.setMessage(message);
+// messageBox.setText(title);
+// int response = messageBox.open();
+// if (response == SWT.YES)
+// b[0] = true;
+// else
+// b[0] = false;
+ b[0] = MessageDialog.openQuestion(getActiveShell(), title, message);
}
});
return b[0];
}
+ private static Shell getActiveShell() {
+ Display display = Display.getDefault();
+ final Shell[] ret = new Shell[1];
+ display.syncExec(new Runnable() {
+
+ public void run() {
+ ret[0] = Display.getCurrent().getActiveShell();
+ }
+
+ });
+ return ret[0];
+ }
@Override
public IPublishCopyCallbackHandler getCallbackHandler(IPath path,
IServer server) {
Show replies by date