Improved xml scanner for this bug
[phpeclipse.git] / net.sourceforge.phpeclipse.xml.ui / src / net / sourceforge / phpeclipse / xml / ui / text / XMLTextTools.java
index 81ce13f..8d05650 100644 (file)
@@ -8,7 +8,7 @@
  * Contributors:
  *     Igor Malinin - initial contribution
  *
- * $Id: XMLTextTools.java,v 1.2 2005-05-06 00:55:41 stefanbjarni Exp $
+ * $Id: XMLTextTools.java,v 1.3 2005-05-15 23:23:02 axelcl Exp $
  */
 
 package net.sourceforge.phpeclipse.xml.ui.text;
@@ -17,6 +17,7 @@ import java.util.Map;
 
 import net.sourceforge.phpeclipse.ui.text.AbstractTextTools;
 import net.sourceforge.phpeclipse.xml.ui.internal.text.DeclScanner;
+import net.sourceforge.phpeclipse.xml.ui.internal.text.PHPXMLPartitionScanner;
 import net.sourceforge.phpeclipse.xml.ui.internal.text.SingleTokenScanner;
 import net.sourceforge.phpeclipse.xml.ui.internal.text.TextScanner;
 import net.sourceforge.phpeclipse.xml.ui.internal.text.XMLCDATAScanner;
@@ -26,7 +27,6 @@ import net.sourceforge.phpeclipse.xml.ui.internal.text.XMLTagScanner;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.IDocumentPartitioner;
 import org.eclipse.jface.text.rules.DefaultPartitioner;
-import org.eclipse.jface.text.rules.IPartitionTokenScanner;
 import org.eclipse.jface.text.rules.ITokenScanner;
 import org.eclipse.jface.text.rules.RuleBasedScanner;
 
@@ -67,7 +67,8 @@ public class XMLTextTools extends AbstractTextTools {
 
        /** The XML partitions scanner */
        private XMLPartitionScanner xmlPartitionScanner;
-
+       
+       private PHPXMLPartitionScanner phpXMLPartitionScanner;
        /** The XML text scanner */
        private TextScanner xmlTextScanner;
 
@@ -101,7 +102,7 @@ public class XMLTextTools extends AbstractTextTools {
                super( store, strTokens );
 
                xmlPartitionScanner = new XMLPartitionScanner( false );
-
+               phpXMLPartitionScanner = new PHPXMLPartitionScanner( false );
                Map tokens = getTokens();
 
                xmlTextScanner = new TextScanner(
@@ -133,12 +134,16 @@ public class XMLTextTools extends AbstractTextTools {
                return new DefaultPartitioner( xmlPartitionScanner, TYPES );
        }
 
+       public IDocumentPartitioner createPHPXMLPartitioner() {
+               return new DefaultPartitioner( phpXMLPartitionScanner, TYPES );
+       }
+       
        /**
         * 
         */
-       public IPartitionTokenScanner getXMLPartitionScanner() {
-               return xmlPartitionScanner;
-       }
+//     public IPartitionTokenScanner getXMLPartitionScanner() {
+//             return xmlPartitionScanner;
+//     }
 
        /**
         * Returns a scanner which is configured to scan XML text.