geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r370627 - 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 20:44:08 GMT
Author: sppatel
Date: Thu Jan 19 12:44:06 2006
New Revision: 370627

URL: http://svn.apache.org/viewcvs?rev=370627&view=rev
Log:
jvm warning

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=370627&r1=370626&r2=370627&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 12:44:06 2006
@@ -101,13 +101,10 @@
 	public void createContent(Composite parent, IWizardHandle handle) {
 
 		fDecorators = new GenericServerCompositeDecorator[1];
-		fDecorators[0] = new JRESelectDecorator(getRuntimeDelegate());
+		fDecorators[0] = new GeronimoJRESelectDecorator(getRuntimeDelegate());
 		GenericServerComposite composite = new GenericServerComposite(parent,
 				fDecorators);
 
-		// TODO Overide JRESelectDecorator to validate only 1.4.2 should be
-		// selected
-
 		Label label = new Label(composite, SWT.NONE);
 		label.setText(Messages.installDir);
 		GridData data = new GridData();
@@ -214,8 +211,7 @@
 	}
 
 	protected void validate() {
-		validateDecorators();
-		
+
 		IRuntime runtime = getRuntimeDelegate().getRuntime();
 
 		if (runtime == null) {
@@ -236,9 +232,12 @@
 		} else {
 			getWizard().setMessage(status.getMessage(), IMessageProvider.ERROR);
 			group.setEnabled(true);
+			return;
 		}
+
+		validateDecorators();
 	}
-	
+
 	private void validateDecorators() {
 		for (int i = 0; i < fDecorators.length; i++) {
 			if (fDecorators[i].validate())
@@ -335,6 +334,32 @@
 				&& getRuntimeDelegate().getRuntime() != null)
 			return getRuntimeDelegate().getRuntime().getName();
 		return null;
+	}
+
+	private class GeronimoJRESelectDecorator extends JRESelectDecorator {
+		public GeronimoJRESelectDecorator(GenericServerRuntime runtime) {
+			super(runtime);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jst.server.generic.ui.internal.GenericServerCompositeDecorator#validate()
+		 */
+		public boolean validate() {
+			if (isValidVM()) {
+				getWizard().setMessage(Messages.jvmWarning,
+						IMessageProvider.WARNING);
+				return true;
+			}
+			getWizard().setMessage(null, IMessageProvider.NONE);
+			return false;
+		}
+
+		private boolean isValidVM() {
+			String vmId = getRuntimeDelegate().getVMInstallId();
+			return vmId == null || !vmId.startsWith("1.4");
+		}
 	}
 
 }

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=370627&r1=370626&r2=370627&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 12:44:06 2006
@@ -179,6 +179,7 @@
 	public static String gWithTomcat;
 	public static String gWithJetty;
 	public static String install;
+	public static String jvmWarning;
 	
 	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=370627&r1=370626&r2=370627&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 12:44:06 2006
@@ -163,4 +163,5 @@
 chooseWebContainer=Select a web container:
 gWithTomcat=Geronimo with Tomcat
 gWithJetty=Geronimo with Jetty
-install=Download and Install
\ No newline at end of file
+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



Mime
View raw message