author | Claus Gittinger <cg@exept.de> |
Tue, 19 Apr 2016 20:15:25 +0200 | |
changeset 16298 | d2b0b69d8bc7 |
parent 15524 | c317a60d78b5 |
child 16299 | 3f157c50fd66 |
child 16554 | b44b9f15aa21 |
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 |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
75 |
|info| |
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
76 |
|
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
77 |
rule notNil ifTrue:[ |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
78 |
rule isComposite ifTrue:[ |
15524
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
79 |
info := rule rules |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
80 |
collect:[:each | (aView resources string:each infoInToolTip)] as:Set. |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
81 |
info size > 1 ifTrue:[ |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
82 |
info := info collect:[:each | '- ',each]. |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
83 |
]. |
c317a60d78b5
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15292
diff
changeset
|
84 |
info := info asStringCollection asStringWith:Character cr. |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
85 |
] ifFalse:[ |
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
86 |
info := aView resources string:rule infoInToolTip |
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
87 |
]. |
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
88 |
|
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
89 |
^ aView resources |
16298 | 90 |
stringWithCRs:'Lint says (click on icon for details):\%1' "/ 'Lint says: %1\Click for more info.' |
15101
05cf28ac84ef
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
15028
diff
changeset
|
91 |
with:info. |
14995
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
92 |
]. |
9dc92bd11831
class: Tools::LintAnnotation
Claus Gittinger <cg@exept.de>
parents:
13857
diff
changeset
|
93 |
^ nil |
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 |
|
15028
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
96 |
!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
|
97 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
98 |
printOn:aStream |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
99 |
"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
|
100 |
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
|
101 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
102 |
self basicPrintOn: aStream. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
103 |
aStream nextPut: $(. |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
104 |
line printOn: 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 |
|
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
107 |
"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
|
108 |
! ! |
5b22d7abf3e0
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14995
diff
changeset
|
109 |
|
13857 | 110 |
!LintAnnotation class methodsFor:'documentation'! |
111 |
||
112 |
version |
|
16298 | 113 |
^ '$Header$' |
13857 | 114 |
! |
115 |
||
116 |
version_CVS |
|
16298 | 117 |
^ '$Header$' |
13857 | 118 |
! ! |
119 |