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.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.phpeditor.php.HTMLPartitionScanner;
+import net.sourceforge.phpeclipse.phpeditor.php.PHPCodeScanner;
import net.sourceforge.phpeclipse.phpeditor.php.PHPDocumentPartitioner;
import net.sourceforge.phpeclipse.phpeditor.php.PHPPartitionScanner;
-import net.sourceforge.phpeclipse.phpeditor.php.PHPCodeScanner;
import net.sourceforge.phpeclipse.phpeditor.php.SmartyCodeScanner;
import net.sourceforge.phpeclipse.phpeditor.php.SmartyDocCodeScanner;
import net.sourceforge.phpeclipse.xml.ui.XMLPlugin;
-import net.sourceforge.phpeclipse.xml.ui.internal.text.SingleTokenScanner;
import net.sourceforge.phpeclipse.xml.ui.internal.text.XMLPartitionScanner;
import net.sourceforge.phpeclipse.xml.ui.text.XMLTextTools;
import org.eclipse.jface.text.IDocumentExtension3;
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.RuleBasedScanner;
-import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
/** The Java singleline comment scanner */
private SingleTokenPHPScanner fSinglelineCommentScanner;
- /** The Java string scanner */
- private SingleTokenPHPScanner fStringScanner;
+ /** The PHP double quoted string scanner */
+// private SingleTokenPHPScanner fStringDQScanner;
+ /** The PHP single quoted string scanner */
+// private SingleTokenPHPScanner fStringSQScanner;
+
/** The PHPDoc scanner */
private PHPDocCodeScanner fPHPDocScanner;
IPreferenceConstants.PHP_MULTILINE_COMMENT);
fSinglelineCommentScanner = new SingleTokenPHPScanner((JavaColorManager) colorManager, store,
IPreferenceConstants.PHP_SINGLELINE_COMMENT);
- fStringScanner = new SingleTokenPHPScanner((JavaColorManager) colorManager, store, IPreferenceConstants.PHP_STRING);
+// fStringDQScanner = new SingleTokenPHPScanner((JavaColorManager) colorManager, store, IPreferenceConstants.PHP_STRING);
+// fStringSQScanner = new SingleTokenPHPScanner((JavaColorManager) colorManager, store, IPreferenceConstants.PHP_STRING);
+
fPHPDocScanner = new PHPDocCodeScanner((JavaColorManager) colorManager, store);
// fHTMLScanner = new HTMLCodeScanner((JavaColorManager)fColorManager, store);
fSmartyScanner = new SmartyCodeScanner((JavaColorManager) colorManager, store);
fCodeScanner = null;
fMultilineCommentScanner = null;
fSinglelineCommentScanner = null;
- fStringScanner = null;
+// fStringDQScanner = null;
+// fStringSQScanner = null;
fPHPDocScanner = null;
// fPartitionScanner = null;
*
* @since 2.0
*/
- public RuleBasedScanner getStringScanner() {
- return fStringScanner;
- }
+// public RuleBasedScanner getStringScanner() {
+// return fStringDQScanner;
+// }
/**
* Returns a scanner which is configured to scan JavaDoc compliant comments. Notes that the start sequence "/**" and the
// return fCodeScanner.affectsBehavior(event)
// || fMultilineCommentScanner.affectsBehavior(event)
// || fSinglelineCommentScanner.affectsBehavior(event)
- // || fStringScanner.affectsBehavior(event)
+ // || fStringDQScanner.affectsBehavior(event)
// || fPHPDocScanner.affectsBehavior(event);
// }
/**
fMultilineCommentScanner.adaptToPreferenceChange(event);
if (fSinglelineCommentScanner.affectsBehavior(event))
fSinglelineCommentScanner.adaptToPreferenceChange(event);
- // if (fStringScanner.affectsBehavior(event))
- // fStringScanner.adaptToPreferenceChange(event);
+ // if (fStringDQScanner.affectsBehavior(event))
+ // fStringDQScanner.adaptToPreferenceChange(event);
if (fPHPDocScanner.affectsBehavior(event))
fPHPDocScanner.adaptToPreferenceChange(event);
// if (fHTMLScanner.affectsBehavior(event))
/**
* Return a scanner for creating xml partitions.
*/
- private static XMLPartitionScanner getXMLPartitionScanner() {
- // if (XML_PARTITION_SCANNER == null)
- // XML_PARTITION_SCANNER = new HTMLPartitionScanner(IPHPPartitions.XML_FILE);
- // return XML_PARTITION_SCANNER;
- if (XML_PARTITION_SCANNER == null)
- XML_PARTITION_SCANNER = new XMLPartitionScanner(false);
- return XML_PARTITION_SCANNER;
- }
+// private static XMLPartitionScanner getXMLPartitionScanner() {
+// // if (XML_PARTITION_SCANNER == null)
+// // XML_PARTITION_SCANNER = new HTMLPartitionScanner(IPHPPartitions.XML_FILE);
+// // return XML_PARTITION_SCANNER;
+// if (XML_PARTITION_SCANNER == null)
+// XML_PARTITION_SCANNER = new XMLPartitionScanner(false);
+// return XML_PARTITION_SCANNER;
+// }
private PHPPartitionScanner getJSPPartitionScanner() {
if (jspPartitionScanner == null)