geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r370634 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal: GeronimoServerRuntimeWizardFragment.java Messages.java Messages.properties
Date Thu, 19 Jan 2006 21:14:02 GMT
Author: sppatel
Date: Thu Jan 19 13:13:39 2006
New Revision: 370634

URL: http://svn.apache.org/viewcvs?rev=370634&view=rev
Log:
add confirm dialog

Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java?rev=370634&r1=370633&r2=370634&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java
Thu Jan 19 13:13:39 2006
@@ -44,6 +44,8 @@
 import org.eclipse.swt.widgets.DirectoryDialog;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.wst.server.core.IRuntime;
 import org.eclipse.wst.server.core.IRuntimeType;
@@ -180,20 +182,22 @@
 			install.addSelectionListener(new SelectionAdapter() {
 				public void widgetSelected(SelectionEvent se) {
 					if (installDir != null && isValidLocation()) {
-						try {
-							Path installPath = new Path(installDir.getText());
-							if (tomcat.getSelection()) {
-								gWithTomcat.install(installPath,
-										new NullProgressMonitor());
-							} else {
-								gWithJetty.install(installPath,
+						Shell shell = installDir.getShell();
+						MessageBox mb = new MessageBox(shell,SWT.OK|SWT.CANCEL|SWT.ICON_QUESTION);
+						mb.setText(Messages.installTitle);
+						mb.setMessage(Messages.installMessage + "\n" + installDir.getText());
+						if(mb.open() == SWT.OK) {
+							try {
+								IInstallableRuntime installable = tomcat.getSelection() ? gWithTomcat : gWithJetty;
+								Path installPath = new Path(installDir.getText());
+								installable.install(installPath,
 										new NullProgressMonitor());
+								updateInstallDir(installPath);
+							} catch (Exception e) {
+								Trace.trace(Trace.SEVERE,
+										"Error installing runtime", e);
 							}
-							updateInstallDir(installPath);
-						} catch (Exception e) {
-							Trace.trace(Trace.SEVERE,
-									"Error installing runtime", e);
-						}
+						}	
 					}
 				}
 

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java?rev=370634&r1=370633&r2=370634&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
Thu Jan 19 13:13:39 2006
@@ -180,6 +180,8 @@
 	public static String gWithJetty;
 	public static String install;
 	public static String jvmWarning;
+	public static String installTitle;
+	public static String installMessage;
 	
 	static {
 		NLS.initializeMessages(GeronimoUIPlugin.PLUGIN_ID

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties?rev=370634&r1=370633&r2=370634&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
Thu Jan 19 13:13:39 2006
@@ -164,4 +164,6 @@
 gWithTomcat=Geronimo with Tomcat
 gWithJetty=Geronimo with Jetty
 install=Download and Install
-jvmWarning=Geronimo is currently only certified on a 1.4 JVM. Use of any other version is
not currently supported.
\ No newline at end of file
+jvmWarning=Geronimo is currently only certified on a 1.4 JVM. Use of any other version is
not currently supported.
+installTitle=Download and Install Geronimo?
+installMessage=The Geronimo J2EE Application Server will be installed to
\ No newline at end of file



Mime
View raw message