X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/text/JavaTextTools.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/text/JavaTextTools.java index ec11f3c..946e308 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/text/JavaTextTools.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/text/JavaTextTools.java @@ -6,11 +6,11 @@ package net.sourceforge.phpdt.ui.text; */ import net.sourceforge.phpdt.internal.ui.text.FastJavaPartitionScanner; +import net.sourceforge.phpdt.internal.ui.text.IPHPPartitions; import net.sourceforge.phpdt.internal.ui.text.JavaColorManager; import net.sourceforge.phpdt.internal.ui.text.phpdoc.PHPDocCodeScanner; import net.sourceforge.phpeclipse.IPreferenceConstants; import net.sourceforge.phpeclipse.phpeditor.php.HTMLCodeScanner; -import net.sourceforge.phpeclipse.phpeditor.php.IPHPPartitionScannerConstants; import net.sourceforge.phpeclipse.phpeditor.php.PHPCodeScanner; import net.sourceforge.phpeclipse.phpeditor.php.PHPPartitionScanner; import net.sourceforge.phpeclipse.phpeditor.php.SmartyCodeScanner; @@ -53,14 +53,14 @@ public class JavaTextTools { // private final static String[] TYPES= new String[] { PHPPartitionScanner.PHP, PHPPartitionScanner.JAVA_DOC, PHPPartitionScanner.JAVA_MULTILINE_COMMENT }; private final static String[] TYPES = new String[] { - IPHPPartitionScannerConstants.PHP, - IPHPPartitionScannerConstants.PHP_MULTILINE_COMMENT, - IPHPPartitionScannerConstants.HTML, - IPHPPartitionScannerConstants.HTML_MULTILINE_COMMENT, - IPHPPartitionScannerConstants.JAVASCRIPT, - IPHPPartitionScannerConstants.CSS, - IPHPPartitionScannerConstants.SMARTY, - IPHPPartitionScannerConstants.SMARTY_MULTILINE_COMMENT }; + IPHPPartitions.PHP_PARTITIONING, + IPHPPartitions.PHP_PHPDOC_COMMENT, + IPHPPartitions.HTML, + IPHPPartitions.HTML_MULTILINE_COMMENT, + IPHPPartitions.JAVASCRIPT, + IPHPPartitions.CSS, + IPHPPartitions.SMARTY, + IPHPPartitions.SMARTY_MULTILINE_COMMENT }; private static PHPPartitionScanner XML_PARTITION_SCANNER = null; /** @@ -95,7 +95,7 @@ public class JavaTextTools { /** The SmartyDoc scanner */ private SmartyDocCodeScanner fSmartyDocScanner; /** The Java partitions scanner */ - private FastJavaPartitionScanner fPartitionScanner; + private PHPPartitionScanner fPartitionScanner; /** The preference store */ private IPreferenceStore fPreferenceStore; @@ -131,7 +131,8 @@ public class JavaTextTools { fHTMLScanner = new HTMLCodeScanner(fColorManager, store); fSmartyScanner = new SmartyCodeScanner(fColorManager, store); fSmartyDocScanner = new SmartyDocCodeScanner(fColorManager, store); - fPartitionScanner = new FastJavaPartitionScanner(); +// fPartitionScanner = new FastJavaPartitionScanner(); + fPartitionScanner = new PHPPartitionScanner(); } /** @@ -167,7 +168,8 @@ public class JavaTextTools { fHTMLScanner = new HTMLCodeScanner(fColorManager, store); fSmartyScanner = new SmartyCodeScanner(fColorManager, store); fSmartyDocScanner = new SmartyDocCodeScanner(fColorManager, store); - fPartitionScanner = new FastJavaPartitionScanner(); + // fPartitionScanner = new FastJavaPartitionScanner(); + fPartitionScanner = new PHPPartitionScanner(); } /** @@ -469,7 +471,7 @@ public class JavaTextTools { */ private static PHPPartitionScanner getHTMLPartitionScanner() { if (HTML_PARTITION_SCANNER == null) - HTML_PARTITION_SCANNER = new PHPPartitionScanner(IPHPPartitionScannerConstants.HTML_FILE); + HTML_PARTITION_SCANNER = new PHPPartitionScanner(IPHPPartitions.HTML_FILE); return HTML_PARTITION_SCANNER; } /** @@ -477,7 +479,7 @@ public class JavaTextTools { */ private static PHPPartitionScanner getPHPPartitionScanner() { if (PHP_PARTITION_SCANNER == null) - PHP_PARTITION_SCANNER = new PHPPartitionScanner(IPHPPartitionScannerConstants.PHP_FILE); + PHP_PARTITION_SCANNER = new PHPPartitionScanner(IPHPPartitions.PHP_FILE); return PHP_PARTITION_SCANNER; } @@ -486,7 +488,7 @@ public class JavaTextTools { */ private static PHPPartitionScanner getSmartyPartitionScanner() { if (SMARTY_PARTITION_SCANNER == null) - SMARTY_PARTITION_SCANNER = new PHPPartitionScanner(IPHPPartitionScannerConstants.SMARTY_FILE); + SMARTY_PARTITION_SCANNER = new PHPPartitionScanner(IPHPPartitions.SMARTY_FILE); return SMARTY_PARTITION_SCANNER; } @@ -495,7 +497,7 @@ public class JavaTextTools { */ private static PHPPartitionScanner getXMLPartitionScanner() { if (XML_PARTITION_SCANNER == null) - XML_PARTITION_SCANNER = new PHPPartitionScanner(IPHPPartitionScannerConstants.XML_FILE); + XML_PARTITION_SCANNER = new PHPPartitionScanner(IPHPPartitions.XML_FILE); return XML_PARTITION_SCANNER; }