author | Claus Gittinger <cg@exept.de> |
Thu, 04 Dec 2014 18:39:44 +0100 | |
changeset 14995 | 9dc92bd11831 |
parent 13857 | f60d162c2af2 |
child 15028 | 5b22d7abf3e0 |
permissions | -rw-r--r-- |
13857 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
"{ Package: 'stx:libtool' }" |
|
13 |
||
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
Object subclass:#LintAnnotation |
|
17 |
instanceVariableNames:'startPosition endPosition line rule' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-Lint' |
|
21 |
! |
|
22 |
||
23 |
!LintAnnotation class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! ! |
|
38 |
||
39 |
!LintAnnotation class methodsFor:'instance creation'! |
|
40 |
||
41 |
from: start to: end rule: rule |
|
42 |
||
43 |
^self new |
|
44 |
startPosition: start; |
|
45 |
endPosition: end; |
|
46 |
rule: rule; |
|
47 |
yourself. |
|
48 |
||
49 |
"Created: / 30-01-2012 / 15:23:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
50 |
! ! |
|
51 |
||
52 |
!LintAnnotation methodsFor:'accessing'! |
|
53 |
||
54 |
endPosition |
|
55 |
^ endPosition |
|
56 |
! |
|
57 |
||
58 |
endPosition:anInteger |
|
59 |
endPosition := anInteger. |
|
60 |
! |
|
61 |
||
62 |
line |
|
63 |
^ line |
|
64 |
! |
|
65 |
||
66 |
line:anInteger |
|
67 |
line := anInteger. |
|
68 |
! |
|
69 |
||
70 |
rule |
|
71 |
^ rule |
|
72 |
! |
|
73 |
||
74 |
rule:anRBLintRule |
|
75 |
self assert: anRBLintRule isComposite not. |
|
76 |
rule := anRBLintRule. |
|
77 |
||
78 |
"Modified: / 30-01-2012 / 15:22:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
79 |
! |
|
80 |
||
81 |
startPosition |
|
82 |
^ startPosition |
|
83 |
! |
|
84 |
||
85 |
startPosition:anInteger |
|
86 |
startPosition := anInteger. |
|
87 |
! ! |
|
88 |
||
89 |
!LintAnnotation methodsFor:'comparing'! |
|
90 |
||
91 |
< anObject |
|
92 |
||
93 |
anObject isNumber ifTrue:[^startPosition < anObject]. |
|
94 |
anObject class == self class ifFalse:[^false]. |
|
95 |
||
96 |
^endPosition < anObject startPosition |
|
97 |
||
98 |
"Created: / 14-02-2010 / 13:39:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
99 |
! |
|
100 |
||
101 |
<= aMagnitude |
|
102 |
"return true, if the argument is greater or equal than the receiver" |
|
103 |
||
104 |
^ (aMagnitude < self) not |
|
105 |
! |
|
106 |
||
107 |
= anObject |
|
108 |
||
109 |
anObject class == self class ifFalse:[^false]. |
|
110 |
||
111 |
^startPosition == (anObject startPosition) and: |
|
112 |
[endPosition == (anObject endPosition) and: |
|
113 |
[rule = anObject rule]] |
|
114 |
||
115 |
"Created: / 14-02-2010 / 13:33:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
116 |
! |
|
117 |
||
118 |
> aMagnitude |
|
119 |
"return true, if the argument is less than the receiver" |
|
120 |
||
121 |
^ aMagnitude < self |
|
122 |
! |
|
123 |
||
124 |
>= aMagnitude |
|
125 |
"return true, if the argument is less or equal than the receiver" |
|
126 |
||
127 |
^ (self < aMagnitude) not |
|
128 |
! ! |
|
129 |
||
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
130 |
!LintAnnotation methodsFor:'help'! |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
131 |
|
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
132 |
helpTextFor:aView |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
133 |
rule notNil ifTrue:[ |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
134 |
^ aView resources |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
135 |
stringWithCRs:'Lint says: %1' "/ 'Lint says: %1\Click for more info.' |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
136 |
with:(aView resources string:rule name). |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
137 |
]. |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
138 |
^ nil |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
139 |
! ! |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
140 |
|
13857 | 141 |
!LintAnnotation class methodsFor:'documentation'! |
142 |
||
143 |
version |
|
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
144 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.2 2014-12-04 17:39:44 cg Exp $' |
13857 | 145 |
! |
146 |
||
147 |
version_CVS |
|
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
148 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.2 2014-12-04 17:39:44 cg Exp $' |
13857 | 149 |
! ! |
150 |