extensions.st
changeset 885 46623318ae3b
parent 881 9a58acda666b
child 891 e6d1d6d1db61
--- a/extensions.st	Sat Aug 29 22:39:44 2015 +0100
+++ b/extensions.st	Sat Aug 08 11:00:30 2015 +0200
@@ -542,8 +542,18 @@
 new
     "return an initialized instance"
 
-    ^ (SmallSense::CodeHighlightingService ? self) basicNew initialize.
+    |serviceUsed|
+    
+    "/ cg: what an ugly hack; @Jan, why this
+    "/ ^ (SmallSense::CodeHighlightingService ? self) basicNew initialize.
 
+    "/ cg: at least allow subclassing
+    serviceUsed := self.
+    self == Tools::CodeHighlightingService ifTrue:[
+        serviceUsed := (SmallSense::CodeHighlightingService ? self).
+    ].
+    ^ serviceUsed basicNew initialize
+    
     "Created: / 27-07-2013 / 22:47:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 23-09-2013 / 14:32:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -1303,3 +1313,9 @@
 
     ^ '$Changeset: <not expanded> $'
 ! !
+
+!stx_goodies_smallsense class methodsFor:'documentation'!
+
+extensionsVersion_CVS
+    ^ '$Header$'
+! !