Update SmalltalkLintService to catch up with changes in CodeView2
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 16 Jul 2016 01:44:05 +0100
changeset 975 589eb0269c9f
parent 947 fc447c16aab8
child 983 7379ac82aade
Update SmalltalkLintService to catch up with changes in CodeView2 The API for drawing gutter icon changed so icon-drawing method was not called. Kudos to Patrik for pushing me to have a look.
SmallSense__SmalltalkLintService.st
--- a/SmallSense__SmalltalkLintService.st	Thu May 05 22:05:53 2016 +0200
+++ b/SmallSense__SmalltalkLintService.st	Sat Jul 16 01:44:05 2016 +0100
@@ -397,26 +397,21 @@
 
 !SmalltalkLintService methodsFor:'redrawing'!
 
-drawLine:lineNo in:view atX:x y:y width:w height:h from:startCol to:endColOrNil with:fg and:bg 
+drawLine:lineNo in:view atX:x y:yBaseline width:w height:hFont ascent:aFont 
+    from:startCol to:endColOrNil with:fg and:bg
     "Called by both gutterView and textView (well, not yet) to
      allow services to draw custom things on text view.
      Ask JV what the args means if unsure (I'm lazy to document
      them, now it is just an experiment...)"
 
-    | lang annotation |
-
+    "/ | lang |
     "/ ((lang := codeView language) isNil or:[lang isSmalltalk not]) ifTrue:[ ^ self ].
 
-    UserPreferences current smallSenseBackgroundLintEnabled ifFalse:[ ^ self ].
+    (UserPreferences current smallSenseBackgroundLintEnabled == true) ifFalse:[ ^ self ].
 
-    annotation :=  self annotationAtLine: lineNo.
-    annotation notNil ifTrue:[
-        self drawAnnotationIcon: (ToolbarIconLibrary smalllintWarning16x16)
-                atX: x y: y  width: w height: h.
-    ].
-
-    "Created: / 30-01-2012 / 15:11:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 15-12-2014 / 15:28:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    self drawAnnotationInLine:lineNo 
+         in:view atX:x y:yBaseline width:w height:hFont ascent:aFont 
+         from:startCol to:endColOrNil with:fg and:bg
 ! !
 
 !SmalltalkLintService methodsFor:'registering'!