Tools__LintAnnotation.st
changeset 15028 5b22d7abf3e0
parent 14995 9dc92bd11831
child 15101 05cf28ac84ef
--- a/Tools__LintAnnotation.st	Mon Dec 15 19:57:26 2014 +0100
+++ b/Tools__LintAnnotation.st	Mon Dec 15 21:27:13 2014 +0100
@@ -14,7 +14,7 @@
 "{ NameSpace: Tools }"
 
 Object subclass:#LintAnnotation
-	instanceVariableNames:'startPosition endPosition line rule'
+	instanceVariableNames:'line rule'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-Lint'
@@ -51,14 +51,6 @@
 
 !LintAnnotation methodsFor:'accessing'!
 
-endPosition
-    ^ endPosition
-!
-
-endPosition:anInteger
-    endPosition := anInteger.
-!
-
 line
     ^ line
 !
@@ -72,59 +64,9 @@
 !
 
 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.
-! !
-
-!LintAnnotation methodsFor:'comparing'!
-
-< anObject
-
-    anObject isNumber ifTrue:[^startPosition < anObject].
-    anObject class == self class ifFalse:[^false].
-
-    ^endPosition < anObject startPosition
-
-    "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
-
-    anObject class == self class ifFalse:[^false].
-
-    ^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>"
-!
-
-> aMagnitude
-    "return true, if the argument is less than the receiver"
-
-    ^ aMagnitude < self
-!
-
->= aMagnitude
-    "return true, if the argument is less or equal than the receiver"
-
-    ^ (self < aMagnitude) not
+    "Modified: / 15-12-2014 / 13:10:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !LintAnnotation methodsFor:'help'!
@@ -138,13 +80,27 @@
     ^ nil
 ! !
 
+!LintAnnotation methodsFor:'printing & storing'!
+
+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."
+
+    self basicPrintOn: aStream.
+    aStream nextPut: $(.
+    line printOn: aStream.
+    aStream nextPut: $).
+
+    "Modified: / 15-12-2014 / 13:41:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !LintAnnotation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.2 2014-12-04 17:39:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.3 2014-12-15 20:27:13 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.2 2014-12-04 17:39:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.3 2014-12-15 20:27:13 vrany Exp $'
 ! !