[jbosstools-commits] JBoss Tools SVN: r6684 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: widget/editor and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Mar 4 20:09:56 EST 2008


Author: dgolovin
Date: 2008-03-04 20:09:56 -0500 (Tue, 04 Mar 2008)
New Revision: 6684

Modified:
   trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
   trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1786 error message for version incompatibility is changed to warning

Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java	2008-03-05 00:28:14 UTC (rev 6683)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java	2008-03-05 01:09:56 UTC (rev 6684)
@@ -151,7 +151,7 @@
 			}
 			String version = (String) context;
 
-			if(version.startsWith("2.0")) { //$NON-NLS-1$
+			if(version.startsWith("2.")) { //$NON-NLS-1$
 				File seamJarFile = new File(value.toString(), "lib/jboss-seam.jar"); //$NON-NLS-1$
 				if (!seamJarFile.isFile()) {
 					errors = createErrorMap();

Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java	2008-03-05 00:28:14 UTC (rev 6683)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java	2008-03-05 01:09:56 UTC (rev 6684)
@@ -540,9 +540,7 @@
 					}
 					if (seamVersion != null && validSeamVersions != null) {
 						for (SeamVersion ver : validSeamVersions) {
-							if (seamVersion.matches(ver.toString().replace(".",
-									"\\.")
-									+ ".*")) {
+							if (seamVersion.matches(ver.toString().substring(0,1)+ ".*")) {
 								version.setValue(ver.toString());
 								break;
 							}
@@ -606,10 +604,15 @@
 				return;
 			} else if (!seamVersion.matches(version.getValueAsString().replace(
 					".", "\\.") + ".*")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-				setMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
-						+ seamVersion + "'", IMessageProvider.WARNING); //$NON-NLS-1$
-				setPageComplete(true);
-				return;
+				if(seamVersion.matches(version.getValueAsString().substring(0,1)+".*")) {
+					setMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
+							+ seamVersion + "'", IMessageProvider.WARNING); //$NON-NLS-1$
+				} else {
+					setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
+							+ seamVersion + "'"); //$NON-NLS-1$
+					setPageComplete(false);
+					return;
+				}
 			}
 
 			Map errors = ValidatorFactory.JBOSS_SEAM_HOME_FOLDER_VALIDATOR




More information about the jbosstools-commits mailing list