You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2006/07/09 19:35:21 UTC

svn commit: r420327 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/GeronimoServerRuntimeWizardFragment.java

Author: sppatel
Date: Sun Jul  9 10:35:21 2006
New Revision: 420327

URL: http://svn.apache.org/viewvc?rev=420327&view=rev
Log:
fix wrong directory specified after install

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

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/GeronimoServerRuntimeWizardFragment.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/GeronimoServerRuntimeWizardFragment.java?rev=420327&r1=420326&r2=420327&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/GeronimoServerRuntimeWizardFragment.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/GeronimoServerRuntimeWizardFragment.java Sun Jul  9 10:35:21 2006
@@ -62,6 +62,7 @@
 import org.eclipse.wst.server.core.ServerCore;
 import org.eclipse.wst.server.core.TaskModel;
 import org.eclipse.wst.server.core.internal.IInstallableRuntime;
+import org.eclipse.wst.server.core.internal.InstallableRuntime;
 import org.eclipse.wst.server.core.internal.ServerPlugin;
 import org.eclipse.wst.server.core.model.RuntimeDelegate;
 import org.eclipse.wst.server.ui.wizard.IWizardHandle;
@@ -160,7 +161,7 @@
 
 		final IInstallableRuntime gWithTomcat = ServerPlugin.findInstallableRuntime(gRuntime.getInstallableJettyTomcatId());
 		final IInstallableRuntime gWithJetty = ServerPlugin.findInstallableRuntime(gRuntime.getInstallableJettyTomcatId());
-
+		
 		if (gWithTomcat != null && gWithJetty != null) {
 			group = new Group(composite, SWT.NONE);
 			group.setText(Messages.downloadOptions);
@@ -236,7 +237,11 @@
 				}
 
 				void updateInstallDir(IPath installPath) {
-					installPath = installPath.append("geronimo-1.0");
+					InstallableRuntime installable = (InstallableRuntime) (tomcat.getSelection() ? gWithTomcat : gWithJetty);
+					String version = installable.getFeatureVersion();
+					if(version.endsWith(".0"))
+						version = version.substring(0, version.lastIndexOf(".0"));
+					installPath = installPath.append("geronimo-" + version);
 					installDir.setText(installPath.toOSString());
 				}
 			});