author | Claus Gittinger <cg@exept.de> |
Thu, 19 Mar 2015 12:04:03 +0100 | |
changeset 15524 | c317a60d78b5 |
parent 15292 | bd889ce17f57 |
child 15566 | 184cea584be5 |
child 16298 | d2b0b69d8bc7 |
permissions | -rw-r--r-- |
15524
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
2 |
|
13857 | 3 |
" |
4 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
14 |
"{ Package: 'stx:libtool' }" |
|
15 |
||
16 |
"{ NameSpace: Tools }" |
|
17 |
||
18 |
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
|
19 |
instanceVariableNames:'line rule' |
13857 | 20 |
classVariableNames:'' |
21 |
poolDictionaries:'' |
|
22 |
category:'Interface-Lint' |
|
23 |
! |
|
24 |
||
25 |
!LintAnnotation class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! ! |
|
40 |
||
41 |
!LintAnnotation class methodsFor:'instance creation'! |
|
42 |
||
43 |
from: start to: end rule: rule |
|
44 |
||
45 |
^self new |
|
46 |
startPosition: start; |
|
47 |
endPosition: end; |
|
48 |
rule: rule; |
|
49 |
yourself. |
|
50 |
||
51 |
"Created: / 30-01-2012 / 15:23:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
52 |
! ! |
|
53 |
||
54 |
!LintAnnotation methodsFor:'accessing'! |
|
55 |
||
56 |
line |
|
57 |
^ line |
|
58 |
! |
|
59 |
||
60 |
line:anInteger |
|
61 |
line := anInteger. |
|
62 |
! |
|
63 |
||
64 |
rule |
|
65 |
^ rule |
|
66 |
! |
|
67 |
||
68 |
rule:anRBLintRule |
|
69 |
rule := anRBLintRule. |
|
70 |
||
15028
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
71 |
"Modified: / 15-12-2014 / 13:10:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13857 | 72 |
! ! |
73 |
||
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
74 |
!LintAnnotation methodsFor:'help'! |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
75 |
|
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
76 |
helpTextFor:aView |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
77 |
|info| |
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
78 |
|
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
79 |
rule notNil ifTrue:[ |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
80 |
rule isComposite ifTrue:[ |
15524
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
81 |
info := rule rules |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
82 |
collect:[:each | (aView resources string:each infoInToolTip)] as:Set. |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
83 |
info size > 1 ifTrue:[ |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
84 |
info := info collect:[:each | '- ',each]. |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
85 |
]. |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
86 |
info := info asStringCollection asStringWith:Character cr. |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
87 |
] ifFalse:[ |
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
88 |
info := aView resources string:rule infoInToolTip |
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
89 |
]. |
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
90 |
|
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
91 |
^ aView resources |
15292 | 92 |
stringWithCRs:'Lint says:\%1' "/ 'Lint says: %1\Click for more info.' |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
93 |
with:info. |
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
94 |
]. |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
95 |
^ nil |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
96 |
! ! |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
97 |
|
15028
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
98 |
!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
|
99 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
100 |
printOn:aStream |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
101 |
"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
|
102 |
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
|
103 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
104 |
self basicPrintOn: aStream. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
105 |
aStream nextPut: $(. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
106 |
line printOn: aStream. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
107 |
aStream nextPut: $). |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
108 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
109 |
"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
|
110 |
! ! |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
111 |
|
13857 | 112 |
!LintAnnotation class methodsFor:'documentation'! |
113 |
||
114 |
version |
|
15524
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
115 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.6 2015-03-19 11:04:03 cg Exp $' |
13857 | 116 |
! |
117 |
||
118 |
version_CVS |
|
15524
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
119 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintAnnotation.st,v 1.6 2015-03-19 11:04:03 cg Exp $' |
13857 | 120 |
! ! |
121 |