private AbstractJavaScanner fSinglelineCommentScanner;
/**
- * The Java string scanner
- *
- * @since 3.0
+ * The PHP double quoted string scanner
*/
- private AbstractJavaScanner fStringScanner;
-
+ private AbstractJavaScanner fStringDQScanner;
+ /**
+ * The PHP single quoted string scanner
+ */
+ private AbstractJavaScanner fStringSQScanner;
+
/**
* The Javadoc scanner
*
// fCodeScanner = (AbstractJavaScanner) fJavaTextTools.getCodeScanner();
// fMultilineCommentScanner = (AbstractJavaScanner) fJavaTextTools.getMultilineCommentScanner();
// fSinglelineCommentScanner = (AbstractJavaScanner) fJavaTextTools.getSinglelineCommentScanner();
- // fStringScanner = (AbstractJavaScanner) fJavaTextTools.getStringScanner();
+ // fStringDQScanner = (AbstractJavaScanner) fJavaTextTools.getStringScanner();
// fJavaDocScanner = (AbstractJavaScanner) fJavaTextTools.getJavaDocScanner();
// fTextEditor = editor;
// fXMLTextTools = XMLPlugin.getDefault().getXMLTextTools();
IPreferenceConstants.PHP_MULTILINE_COMMENT);
fSinglelineCommentScanner = new SingleTokenPHPScanner(getColorManager(), fPreferenceStore,
IPreferenceConstants.PHP_SINGLELINE_COMMENT);
- fStringScanner = new SingleTokenPHPScanner(getColorManager(), fPreferenceStore, IPreferenceConstants.PHP_STRING);
+ fStringDQScanner = new SingleTokenPHPScanner(getColorManager(), fPreferenceStore, IPreferenceConstants.PHP_STRING_DQ);
+ fStringSQScanner = new SingleTokenPHPScanner(getColorManager(), fPreferenceStore, IPreferenceConstants.PHP_STRING_SQ);
fJavaDocScanner = new PHPDocCodeScanner(getColorManager(), fPreferenceStore);
}
*/
public boolean affectsTextPresentation(PropertyChangeEvent event) {
return fCodeScanner.affectsBehavior(event) || fMultilineCommentScanner.affectsBehavior(event)
- || fSinglelineCommentScanner.affectsBehavior(event) || fStringScanner.affectsBehavior(event)
+ || fSinglelineCommentScanner.affectsBehavior(event) || fStringDQScanner.affectsBehavior(event)|| fStringSQScanner.affectsBehavior(event)
|| fJavaDocScanner.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 (fStringSQScanner.affectsBehavior(event))
+ fStringSQScanner.adaptToPreferenceChange(event);
if (fJavaDocScanner.affectsBehavior(event))
fJavaDocScanner.adaptToPreferenceChange(event);
}
}
/**
- * Returns the Java string scanner for this configuration.
+ * Returns the PHP double quoted string scanner for this configuration.
*
- * @return the Java string scanner
- * @since 2.0
+ * @return the PHP double quoted string scanner
*/
- protected RuleBasedScanner getStringScanner() {
- return fStringScanner;
+ protected RuleBasedScanner getStringDQScanner() {
+ return fStringDQScanner;
}
/**
+ * Returns the PHP single quoted string scanner for this configuration.
+ *
+ * @return the PHP single quoted string scanner
+ */
+ protected RuleBasedScanner getStringSQScanner() {
+ return fStringSQScanner;
+ }
+ /**
* Returns the HTML source code scanner for this configuration.
*
* @return the HTML source code scanner
return null;
}
- // public IReconciler getReconciler(ISourceViewer sourceViewer) {
- // if (getEditor() != null && getEditor().isEditable()) {
- // JavaReconciler reconciler = new JavaReconciler(getEditor(),
- // new JavaReconcilingStrategy(getEditor()), false);
- // reconciler.setProgressMonitor(new NullProgressMonitor());
- // reconciler.setDelay(500);
- // return reconciler;
- // }
- // return null;
- // }
/*
* @see SourceViewerConfiguration#getConfiguredTextHoverStateMasks(ISourceViewer, String)
* @since 2.1
phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_PHPDOC_COMMENT);
phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_PHPDOC_COMMENT);
- phpDR = new DefaultDamagerRepairer(getStringScanner());
+ phpDR = new DefaultDamagerRepairer(getStringDQScanner());
phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_STRING_DQ);
phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_STRING_DQ);
- phpDR = new DefaultDamagerRepairer(getStringScanner());
+ phpDR = new DefaultDamagerRepairer(getStringSQScanner());
phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_STRING_SQ);
- phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_STRING_SQ);
+ phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_STRING_SQ);
phpDR = new DefaultDamagerRepairer(getSinglelineCommentScanner());
phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_SINGLELINE_COMMENT);
phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_SINGLELINE_COMMENT);