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;
/** 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;
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();
}
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.
*
* @since 2.0
*/
public boolean affectsBehavior(PropertyChangeEvent event) {
- return // fCodeScanner.affectsBehavior(event) ||
+ return fCodeScanner.affectsBehavior(event) ||
fMultilineCommentScanner.affectsBehavior(event) ||
fSinglelineCommentScanner.affectsBehavior(event) ||
- fStringScanner.affectsBehavior(event); // ||
-// fJavaDocScanner.affectsBehavior(event);
+ fStringScanner.affectsBehavior(event) ||
+ fJavaDocScanner.affectsBehavior(event);
}
/**
* @since 2.0
*/
protected void adaptToPreferenceChange(PropertyChangeEvent event) {
-// if (fCodeScanner.affectsBehavior(event))
-// fCodeScanner.adaptToPreferenceChange(event);
+ if (fCodeScanner.affectsBehavior(event))
+ fCodeScanner.adaptToPreferenceChange(event);
if (fMultilineCommentScanner.affectsBehavior(event))
fMultilineCommentScanner.adaptToPreferenceChange(event);
if (fSinglelineCommentScanner.affectsBehavior(event))
fSinglelineCommentScanner.adaptToPreferenceChange(event);
if (fStringScanner.affectsBehavior(event))
fStringScanner.adaptToPreferenceChange(event);
-// if (fJavaDocScanner.affectsBehavior(event))
-// fJavaDocScanner.adaptToPreferenceChange(event);
+ if (fJavaDocScanner.affectsBehavior(event))
+ fJavaDocScanner.adaptToPreferenceChange(event);
}
}
\ No newline at end of file