author | Claus Gittinger <cg@exept.de> |
Wed, 13 Sep 2017 16:21:45 +0200 | |
changeset 17689 | 3aab8c42049c |
parent 16610 | 0eaa2a36a085 |
child 16617 | 69e7de1ef22f |
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 |
|
15028
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
17 |
instanceVariableNames:'line rule' |
13857 | 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 |
line |
|
55 |
^ line |
|
56 |
! |
|
57 |
||
58 |
line:anInteger |
|
59 |
line := anInteger. |
|
60 |
! |
|
61 |
||
62 |
rule |
|
63 |
^ rule |
|
64 |
! |
|
65 |
||
66 |
rule:anRBLintRule |
|
67 |
rule := anRBLintRule. |
|
68 |
||
15028
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
69 |
"Modified: / 15-12-2014 / 13:10:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13857 | 70 |
! ! |
71 |
||
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
72 |
!LintAnnotation methodsFor:'help'! |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
73 |
|
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
74 |
helpTextFor:aView |
16554 | 75 |
|info resources| |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
76 |
|
16554 | 77 |
rule isNil ifTrue:[^ nil]. |
78 |
||
79 |
resources := self class classResources. |
|
80 |
rule isComposite ifTrue:[ |
|
16610 | 81 |
"/ sigh - must collect here, because lint does not know about my resources. |
16554 | 82 |
info := rule rules |
83 |
collect:[:each | |
|
84 |
(resources string:each infoInToolTip) |
|
85 |
] as:Set. |
|
86 |
info size > 1 ifTrue:[ |
|
87 |
info := info collect:[:each | '- ',each]. |
|
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
88 |
]. |
16554 | 89 |
info := info asStringCollection asStringWith:Character cr. |
90 |
] ifFalse:[ |
|
91 |
info := resources string:rule infoInToolTip |
|
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
92 |
]. |
16554 | 93 |
info isEmptyOrNil ifTrue:[^ nil]. |
94 |
^ resources |
|
16610 | 95 |
stringWithCRs:(('Lint says (click on icon for details):\' withColor:#gray),'\%1') "/ 'Lint says: %1\Click for more info.' |
16554 | 96 |
with:info. |
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
97 |
! ! |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
98 |
|
15028
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
99 |
!LintAnnotation methodsFor:'printing & storing'! |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
100 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
101 |
printOn:aStream |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
102 |
"append a user printed representation of the receiver to aStream. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
103 |
The format is suitable for a human - not meant to be read back." |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
104 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
105 |
self basicPrintOn: aStream. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
106 |
aStream nextPut: $(. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
107 |
line printOn: aStream. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
108 |
aStream nextPut: $). |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
109 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
110 |
"Modified: / 15-12-2014 / 13:41:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
111 |
! ! |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
112 |
|
13857 | 113 |
!LintAnnotation class methodsFor:'documentation'! |
114 |
||
115 |
version |
|
16298 | 116 |
^ '$Header$' |
13857 | 117 |
! |
118 |
||
119 |
version_CVS |
|
16298 | 120 |
^ '$Header$' |
13857 | 121 |
! ! |
122 |