First try, not finished
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ui / text / JavaTextTools.java
index b3073f1..b727794 100644 (file)
@@ -8,6 +8,7 @@ package net.sourceforge.phpdt.ui.text;
 import net.sourceforge.phpdt.internal.ui.text.FastJavaPartitionScanner;
 import net.sourceforge.phpdt.internal.ui.text.JavaColorManager;
 import net.sourceforge.phpdt.internal.ui.text.phpdoc.PHPDocCodeScanner;
+import net.sourceforge.phpeclipse.phpeditor.php.HTMLCodeScanner;
 import net.sourceforge.phpeclipse.phpeditor.php.PHPCodeScanner;
 
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -45,16 +46,18 @@ public class JavaTextTools {
                
        /** The color manager */
        private JavaColorManager fColorManager;
-       /** The Java source code scanner */
+       /** The PHP source code scanner */
        private PHPCodeScanner fCodeScanner;
-       /** The Java multiline comment scanner */
+       /** The PHP multiline comment scanner */
        private SingleTokenPHPScanner fMultilineCommentScanner;
        /** The Java singleline comment scanner */
        private SingleTokenPHPScanner fSinglelineCommentScanner;
        /** The Java string scanner */
        private SingleTokenPHPScanner fStringScanner;
-       /** The JavaDoc scanner */
+       /** The PHPDoc scanner */
        private PHPDocCodeScanner fJavaDocScanner;
+  /** The HTML scanner */
+  private HTMLCodeScanner fHTMLScanner;
        /** The Java partitions scanner */
        private FastJavaPartitionScanner fPartitionScanner;     
        
@@ -81,10 +84,11 @@ public class JavaTextTools {
                
                fColorManager= new JavaColorManager();
                fCodeScanner= new PHPCodeScanner(fColorManager, store);
-               fMultilineCommentScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT);
-               fSinglelineCommentScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT);
-               fStringScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.JAVA_STRING);
+               fMultilineCommentScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.PHP_MULTI_LINE_COMMENT);
+               fSinglelineCommentScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.PHP_SINGLE_LINE_COMMENT);
+               fStringScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.PHP_STRING);
                fJavaDocScanner= new PHPDocCodeScanner(fColorManager, store);
+    fHTMLScanner= new HTMLCodeScanner(fColorManager, store);
                fPartitionScanner= new FastJavaPartitionScanner();
        }
        
@@ -142,6 +146,17 @@ public class JavaTextTools {
                return fMultilineCommentScanner;
        }
 
+  /**
+   * Returns a scanner which is configured to scan HTML code.
+   *
+   * @return a HTML scanner
+   * 
+   * @since 2.0
+   */
+  public RuleBasedScanner getHTMLScanner() {
+    return fHTMLScanner;
+  } 
+  
        /**
         * Returns a scanner which is configured to scan Java singleline comments.
         *