Initial commit: xdebug runtimes for windows and macosx. for xdebug 2.0.0.
[phpeclipse.git] / net.sourceforge.phpeclipse.xml.ui / src / net / sourceforge / phpeclipse / xml / ui / text / DTDTextTools.java
index 032b700..bb2fbbc 100644 (file)
@@ -8,7 +8,7 @@
  * Contributors:
  *     Igor Malinin - initial contribution
  *
- * $Id: DTDTextTools.java,v 1.2 2005-05-06 00:55:41 stefanbjarni Exp $
+ * $Id: DTDTextTools.java,v 1.3 2006-10-21 23:14:13 pombredanne Exp $
  */
 
 package net.sourceforge.phpeclipse.xml.ui.text;
@@ -27,30 +27,21 @@ import org.eclipse.jface.text.rules.DefaultPartitioner;
 import org.eclipse.jface.text.rules.IPartitionTokenScanner;
 import org.eclipse.jface.text.rules.RuleBasedScanner;
 
-
 /**
  * 
  * 
  * @author Igor Malinin
  */
 public class DTDTextTools extends AbstractTextTools {
-       private static final String[] TOKENS = {
-               IXMLSyntaxConstants.XML_DEFAULT,
-               IXMLSyntaxConstants.XML_ATT_NAME,
-               IXMLSyntaxConstants.XML_ATT_VALUE,
-               IXMLSyntaxConstants.XML_ENTITY,
-               IXMLSyntaxConstants.XML_PI,
-               IXMLSyntaxConstants.XML_COMMENT,
-               IXMLSyntaxConstants.XML_DECL,
-               IXMLSyntaxConstants.DTD_CONDITIONAL,
-       };
-
-       private static final String[] TYPES = {
-               XMLPartitionScanner.XML_PI,
-               XMLPartitionScanner.XML_COMMENT,
-               XMLPartitionScanner.XML_DECL,
-               XMLPartitionScanner.DTD_CONDITIONAL,
-       };
+       private static final String[] TOKENS = { IXMLSyntaxConstants.XML_DEFAULT,
+                       IXMLSyntaxConstants.XML_ATT_NAME,
+                       IXMLSyntaxConstants.XML_ATT_VALUE, IXMLSyntaxConstants.XML_ENTITY,
+                       IXMLSyntaxConstants.XML_PI, IXMLSyntaxConstants.XML_COMMENT,
+                       IXMLSyntaxConstants.XML_DECL, IXMLSyntaxConstants.DTD_CONDITIONAL, };
+
+       private static final String[] TYPES = { XMLPartitionScanner.XML_PI,
+                       XMLPartitionScanner.XML_COMMENT, XMLPartitionScanner.XML_DECL,
+                       XMLPartitionScanner.DTD_CONDITIONAL, };
 
        /** The DTD partitions scanner */
        private XMLPartitionScanner dtdPartitionScanner;
@@ -64,7 +55,7 @@ public class DTDTextTools extends AbstractTextTools {
        /** The XML processing instructions scanner */
        private SingleTokenScanner xmlPIScanner;
 
-       /** The XML comments scanner */ 
+       /** The XML comments scanner */
        private SingleTokenScanner xmlCommentScanner;
 
        /** The XML declarations scanner */
@@ -73,33 +64,33 @@ public class DTDTextTools extends AbstractTextTools {
        /**
         * Creates a new DTD text tools collection.
         */
-       public DTDTextTools( IPreferenceStore store ) {
-               super( store, TOKENS );
+       public DTDTextTools(IPreferenceStore store) {
+               super(store, TOKENS);
 
-               dtdPartitionScanner = new XMLPartitionScanner( true );
+               dtdPartitionScanner = new XMLPartitionScanner(true);
 
                Map tokens = getTokens();
 
-               dtdTextScanner = new TextScanner(
-                       tokens, '%', IXMLSyntaxConstants.XML_DEFAULT );
+               dtdTextScanner = new TextScanner(tokens, '%',
+                               IXMLSyntaxConstants.XML_DEFAULT);
 
-               dtdConditionalScanner = new SingleTokenScanner(
-                               tokens, IXMLSyntaxConstants.DTD_CONDITIONAL ); //cond
+               dtdConditionalScanner = new SingleTokenScanner(tokens,
+                               IXMLSyntaxConstants.DTD_CONDITIONAL); // cond
 
-               xmlPIScanner = new SingleTokenScanner(
-                               tokens, IXMLSyntaxConstants.XML_PI );
+               xmlPIScanner = new SingleTokenScanner(tokens,
+                               IXMLSyntaxConstants.XML_PI);
 
-               xmlCommentScanner = new SingleTokenScanner(
-                               tokens, IXMLSyntaxConstants.XML_COMMENT );
+               xmlCommentScanner = new SingleTokenScanner(tokens,
+                               IXMLSyntaxConstants.XML_COMMENT);
 
-               xmlDeclScanner = new DeclScanner( tokens );
+               xmlDeclScanner = new DeclScanner(tokens);
        }
 
        /**
         * 
         */
        public IDocumentPartitioner createDTDPartitioner() {
-               return new DefaultPartitioner( dtdPartitionScanner, TYPES );
+               return new DefaultPartitioner(dtdPartitionScanner, TYPES);
        }
 
        /**
@@ -112,27 +103,26 @@ public class DTDTextTools extends AbstractTextTools {
        /**
         * Returns a scanner which is configured to scan DTD text.
         * 
-        * @return  an DTD text scanner
+        * @return an DTD text scanner
         */
        public RuleBasedScanner getDTDTextScanner() {
                return dtdTextScanner;
        }
 
        /**
-        * Returns a scanner which is configured to scan DTD
-        * conditional sections.
+        * Returns a scanner which is configured to scan DTD conditional sections.
         * 
-        * @return  an DTD conditional section scanner
+        * @return an DTD conditional section scanner
         */
        public RuleBasedScanner getDTDConditionalScanner() {
                return dtdConditionalScanner;
        }
 
        /**
-        * Returns a scanner which is configured to scan XML
-        * processing instructions.
+        * Returns a scanner which is configured to scan XML processing
+        * instructions.
         * 
-        * @return  an XML processing instruction scanner
+        * @return an XML processing instruction scanner
         */
        public RuleBasedScanner getXMLPIScanner() {
                return xmlPIScanner;
@@ -141,7 +131,7 @@ public class DTDTextTools extends AbstractTextTools {
        /**
         * Returns a scanner which is configured to scan XML comments.
         * 
-        * @return  an XML comment scanner
+        * @return an XML comment scanner
         */
        public RuleBasedScanner getXMLCommentScanner() {
                return xmlCommentScanner;
@@ -150,7 +140,7 @@ public class DTDTextTools extends AbstractTextTools {
        /**
         * Returns a scanner which is configured to scan XML declarations.
         * 
-        * @return  an XML declaration scanner
+        * @return an XML declaration scanner
         */
        public RuleBasedScanner getXMLDeclScanner() {
                return xmlDeclScanner;