additional constructor, to delay initialize() call
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/ScriptCommentScanner.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/ScriptCommentScanner.java
index ba5763a..cf8cc68 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/ScriptCommentScanner.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/ScriptCommentScanner.java
@@ -139,6 +139,12 @@
public ScriptCommentScanner(IColorManager manager, IPreferenceStore store,
String comment, String todoTag, ITodoTaskPreferences preferences) {
+ this(manager, store, comment, todoTag, preferences, true);
+ }
+
+ public ScriptCommentScanner(IColorManager manager, IPreferenceStore store,
+ String comment, String todoTag, ITodoTaskPreferences preferences,
+ boolean initializeAutomatically) {
super(manager, store);
fProperties = new String[] { comment, todoTag };
@@ -146,7 +152,9 @@
fDefaultTokenProperty = comment;
this.preferences = preferences;
- initialize();
+ if (initializeAutomatically) {
+ initialize();
+ }
}
@Override