--- a/Tools__LintAnnotation.st Sun Jan 12 23:30:25 2014 +0000
+++ b/Tools__LintAnnotation.st Wed Apr 01 10:38:01 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
@@ -14,7 +16,7 @@
"{ NameSpace: Tools }"
Object subclass:#LintAnnotation
- instanceVariableNames:'startPosition endPosition line rule'
+ instanceVariableNames:'line rule'
classVariableNames:''
poolDictionaries:''
category:'Interface-Lint'
@@ -51,14 +53,6 @@
!LintAnnotation methodsFor:'accessing'!
-endPosition
- ^ endPosition
-!
-
-endPosition:anInteger
- endPosition := anInteger.
-!
-
line
^ line
!
@@ -72,69 +66,56 @@
!
rule:anRBLintRule
- self assert: anRBLintRule isComposite not.
rule := anRBLintRule.
- "Modified: / 30-01-2012 / 15:22:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-startPosition
- ^ startPosition
-!
-
-startPosition:anInteger
- startPosition := anInteger.
+ "Modified: / 15-12-2014 / 13:10:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
-!LintAnnotation methodsFor:'comparing'!
-
-< anObject
+!LintAnnotation methodsFor:'help'!
- anObject isNumber ifTrue:[^startPosition < anObject].
- anObject class == self class ifFalse:[^false].
-
- ^endPosition < anObject startPosition
+helpTextFor:aView
+ |info|
- "Created: / 14-02-2010 / 13:39:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-<= aMagnitude
- "return true, if the argument is greater or equal than the receiver"
-
- ^ (aMagnitude < self) not
-!
-
-= anObject
+ 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
+ ].
- anObject class == self class ifFalse:[^false].
+ ^ aView resources
+ stringWithCRs:'Lint says:\%1' "/ 'Lint says: %1\Click for more info.'
+ with:info.
+ ].
+ ^ nil
+! !
- ^startPosition == (anObject startPosition) and:
- [endPosition == (anObject endPosition) and:
- [rule = anObject rule]]
-
- "Created: / 14-02-2010 / 13:33:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
+!LintAnnotation methodsFor:'printing & storing'!
-> aMagnitude
- "return true, if the argument is less than the receiver"
+printOn:aStream
+ "append a user printed representation of the receiver to aStream.
+ The format is suitable for a human - not meant to be read back."
- ^ aMagnitude < self
-!
+ self basicPrintOn: aStream.
+ aStream nextPut: $(.
+ line printOn: aStream.
+ aStream nextPut: $).
->= aMagnitude
- "return true, if the argument is less or equal than the receiver"
-
- ^ (self < aMagnitude) not
+ "Modified: / 15-12-2014 / 13:41:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!LintAnnotation class methodsFor:'documentation'!
-version_HG
-
- ^ '$Changeset: <not expanded> $'
+version
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.6 2015-03-19 11:04:03 cg Exp $'
!
-version_SVN
- ^ '$Id: Tools__LintAnnotation.st 7854 2012-01-30 17:49:41Z vranyj1 $'
+version_CVS
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.6 2015-03-19 11:04:03 cg Exp $'
! !