Author: scabanovich
Date: 2010-01-21 07:00:27 -0500 (Thu, 21 Jan 2010)
New Revision: 19838
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBEntityRecognizer.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5444
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2010-01-21 08:15:46 UTC (rev
19837)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2010-01-21 12:00:27 UTC (rev
19838)
@@ -82,6 +82,19 @@
<uri
name="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/...
uri="platform:/plugin/org.jboss.tools.esb.core/schemas/jbossesb-1.2.0.xsd"/>
+
+
+ <uri
+
name="http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/produc...
+
uri="platform:/plugin/org.jboss.tools.esb.core/schemas/jbossesb-1.0.1.xsd"/>
+
+ <uri
+
name="http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/produc...
+
uri="platform:/plugin/org.jboss.tools.esb.core/schemas/jbossesb-1.1.0.xsd"/>
+
+ <uri
+
name="http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/produc...
+
uri="platform:/plugin/org.jboss.tools.esb.core/schemas/jbossesb-1.2.0.xsd"/>
</catalogContribution>
</extension>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2010-01-21 08:15:46
UTC (rev 19837)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2010-01-21 12:00:27
UTC (rev 19838)
@@ -2738,7 +2738,7 @@
<XModelAttribute PROPERTIES="save=always"
default="http://www.w3.org/2001/XMLSchema-instance"
name="xmlns:xsi" xmlname="xmlns:xsi"/>
<XModelAttribute PROPERTIES="save=always"
-
default="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/e...
http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml...
+
default="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/e...
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...
name="xsi:schemaLocation" xmlname="xsi:schemaLocation"/>
<XModelAttribute name="encoding">
<Constraint loader="ListString">
@@ -2854,7 +2854,7 @@
<XModelAttribute PROPERTIES="save=always"
default="http://www.w3.org/2001/XMLSchema-instance"
name="xmlns:xsi" xmlname="xmlns:xsi"/>
<XModelAttribute PROPERTIES="save=always"
-
default="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/e...
http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml...
+
default="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/e...
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...
name="xsi:schemaLocation" xmlname="xsi:schemaLocation"/>
<XModelAttribute name="encoding">
<Constraint loader="ListString">
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta 2010-01-21
08:15:46 UTC (rev 19837)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta 2010-01-21
12:00:27 UTC (rev 19838)
@@ -1342,7 +1342,7 @@
<XModelAttribute PROPERTIES="save=always"
default="http://www.w3.org/2001/XMLSchema-instance"
name="xmlns:xsi" xmlname="xmlns:xsi"/>
<XModelAttribute PROPERTIES="save=always"
-
default="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/e...
http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml...
+
default="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/e...
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...
name="xsi:schemaLocation" xmlname="xsi:schemaLocation"/>
<XModelAttribute name="encoding">
<Constraint loader="ListString">
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java 2010-01-21
08:15:46 UTC (rev 19837)
+++
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java 2010-01-21
12:00:27 UTC (rev 19838)
@@ -17,7 +17,11 @@
public String SCHEMA_101 =
"http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd";
//$NON-NLS-1$
public String SCHEMA_110 =
"http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd";
//$NON-NLS-1$
public String SCHEMA_120 =
"http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd";
//$NON-NLS-1$
-
+
+ public String NEW_SCHEMA_101 =
"http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd";
//$NON-NLS-1$
+ public String NEW_SCHEMA_110 =
"http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd";
//$NON-NLS-1$
+ public String NEW_SCHEMA_120 =
"http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd";
//$NON-NLS-1$
+
public String SUFF_101 = "101"; //$NON-NLS-1$
public String SUFF_110 = "110"; //$NON-NLS-1$
public String SUFF_120 = "120"; //$NON-NLS-1$
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBEntityRecognizer.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBEntityRecognizer.java 2010-01-21
08:15:46 UTC (rev 19837)
+++
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBEntityRecognizer.java 2010-01-21
12:00:27 UTC (rev 19838)
@@ -33,17 +33,17 @@
if(j < 0) return null;
int k = body.indexOf("\"", j + 1); //$NON-NLS-1$
if(k < 0) return null;
- String schemaLocation = body.substring(j + 1, k);
+ String schema = body.substring(j + 1, k);
- int i101 = schemaLocation.indexOf("1.0.1"); //$NON-NLS-1$
+ int i101 = schema.indexOf("1.0.1"); //$NON-NLS-1$
if(i101 >= 0) {
return ENT_ESB_FILE_101;
}
- int i110 = schemaLocation.indexOf("1.1.0"); //$NON-NLS-1$
+ int i110 = schema.indexOf("1.1.0"); //$NON-NLS-1$
if(i110 >= 0) {
return ENT_ESB_FILE_110;
}
- int i120 = schemaLocation.indexOf("1.2.0"); //$NON-NLS-1$
+ int i120 = schema.indexOf("1.2.0"); //$NON-NLS-1$
if(i120 >= 0) {
return ENT_ESB_FILE_120;
}
@@ -56,9 +56,13 @@
int j = body.indexOf(">", i); //$NON-NLS-1$
if(j < 0) return false;
String s = body.substring(i, j);
- return s.indexOf("\"" + SCHEMA_101 + "\"") > 0
- || s.indexOf("\"" + SCHEMA_110 + "\"") > 0
- || s.indexOf("\"" + SCHEMA_120 + "\"") > 0;
//$NON-NLS-1$
+ String q = "\"";
+ return s.indexOf(q + SCHEMA_101 + q) > 0
+ || s.indexOf(q + SCHEMA_110 + q) > 0
+ || s.indexOf(q + SCHEMA_120 + q) > 0
+ || s.indexOf(q + NEW_SCHEMA_101 + q) > 0
+ || s.indexOf(q + NEW_SCHEMA_110 + q) > 0
+ || s.indexOf(q + NEW_SCHEMA_120 + q) > 0;
}
}