#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Thu, 12 May 2016 02:29:07 +0200
changeset 16554 b44b9f15aa21
parent 16553 b45ee99763b4
child 16555 6b84fcdf3207
#UI_ENHANCEMENT by cg class: Tools::LintAnnotation changed: #helpTextFor:
Tools__LintAnnotation.st
--- a/Tools__LintAnnotation.st	Wed May 11 20:13:03 2016 +0200
+++ b/Tools__LintAnnotation.st	Thu May 12 02:29:07 2016 +0200
@@ -72,25 +72,27 @@
 !LintAnnotation methodsFor:'help'!
 
 helpTextFor:aView
-    |info|
+    |info resources|
 
-    rule notNil ifTrue:[
-        rule isComposite ifTrue:[
-            info := rule rules 
-                        collect:[:each | (aView resources string:each infoInToolTip)] as:Set.
-            info size > 1 ifTrue:[
-                info := info collect:[:each | '- ',each].
-            ].
-            info := info asStringCollection asStringWith:Character cr. 
-        ] ifFalse:[
-            info := aView resources string:rule infoInToolTip
+    rule isNil ifTrue:[^ nil].
+    
+    resources := self class classResources.
+    rule isComposite ifTrue:[
+        info := rule rules 
+                    collect:[:each | 
+                        (resources string:each infoInToolTip)
+                    ] as:Set.
+        info size > 1 ifTrue:[
+            info := info collect:[:each | '- ',each].
         ].
-
-        ^ aView resources 
-                stringWithCRs:'Lint says (click on icon for details):\%1' "/ 'Lint says: %1\Click for more info.' 
-                with:info.
+        info := info asStringCollection asStringWith:Character cr. 
+    ] ifFalse:[
+        info := resources string:rule infoInToolTip
     ].
-    ^ nil
+    info isEmptyOrNil ifTrue:[^ nil].
+    ^ resources 
+            stringWithCRs:(('Lint says (click on icon for details):' withColor:#gray),'\%1') "/ 'Lint says: %1\Click for more info.' 
+            with:info.
 ! !
 
 !LintAnnotation methodsFor:'printing & storing'!