Author: scabanovich
Date: 2008-11-11 09:52:03 -0500 (Tue, 11 Nov 2008)
New Revision: 11674
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java
Log:
JBIDE-2342
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java 2008-11-11
13:28:19 UTC (rev 11673)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java 2008-11-11
14:52:03 UTC (rev 11674)
@@ -54,20 +54,24 @@
}
//Let it work now for all 2.x versions
//If in future releases differences are essential, this should be modified
- int i20 = schemaLocation.indexOf("-2."); //$NON-NLS-1$
- int i21 = schemaLocation.indexOf("-2.1"); //$NON-NLS-1$
- if(i20 >= 0) {
+ int i20 = schemaLocation.indexOf("-2.0"); //$NON-NLS-1$
+ int i21 = schemaLocation.indexOf("-2."); //$NON-NLS-1$
+ if(i21 < 0 && i20 < 0) {
+ //Try the latest known version anyway.
+ i21 = 0;
+ }
+ if(i21 >= 0) {
if(isSingleComponent) {
- if(i21 >= 0) {
- return ENT_SEAM_COMPONENT_FILE_21;
+ if(i20 >= 0) {
+ return ENT_SEAM_COMPONENT_FILE_20;
}
- return ENT_SEAM_COMPONENT_FILE_20;
+ return ENT_SEAM_COMPONENT_FILE_21;
}
if(isMultiComponent(body)) {
- if(i21 >= 0) {
- return ENT_SEAM_COMPONENTS_21;
+ if(i20 >= 0) {
+ return ENT_SEAM_COMPONENTS_20;
}
- return ENT_SEAM_COMPONENTS_20;
+ return ENT_SEAM_COMPONENTS_21;
}
}
Show replies by date