author | Patrik Svestka <patrik.svestka@gmail.com> |
Tue, 09 Nov 2021 13:59:48 +0100 | |
branch | jv |
changeset 19618 | 76c562829409 |
parent 19617 | 96a62e7ef902 |
permissions | -rw-r--r-- |
13829 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
19617
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
3 |
COPYRIGHT (c) 2021 Patrik Svestka |
13829 | 4 |
All Rights Reserved |
5 |
||
6 |
This software is furnished under a license and may be used |
|
7 |
only in accordance with the terms of that license and with the |
|
8 |
inclusion of the above copyright notice. This software may not |
|
9 |
be provided or otherwise made available to, or used by, any |
|
10 |
other person. No title to or ownership of the software is |
|
11 |
hereby transferred. |
|
12 |
" |
|
10485 | 13 |
"{ Package: 'stx:libtool' }" |
14 |
||
15 |
"{ NameSpace: Tools }" |
|
16 |
||
17 |
Object subclass:#LintHighlighter |
|
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
18 |
instanceVariableNames:'rules rulesToIntervalsMap sequenceNumber formattingMethod |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
19 |
emphasisError emphasisInformation emphasisWarning' |
10485 | 20 |
classVariableNames:'' |
21 |
poolDictionaries:'' |
|
22 |
category:'Interface-Lint' |
|
23 |
! |
|
24 |
||
13829 | 25 |
!LintHighlighter class methodsFor:'documentation'! |
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
19617
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
30 |
COPYRIGHT (c) 2021 Patrik Svestka |
13829 | 31 |
All Rights Reserved |
32 |
||
33 |
This software is furnished under a license and may be used |
|
34 |
only in accordance with the terms of that license and with the |
|
35 |
inclusion of the above copyright notice. This software may not |
|
36 |
be provided or otherwise made available to, or used by, any |
|
37 |
other person. No title to or ownership of the software is |
|
38 |
hereby transferred. |
|
39 |
" |
|
40 |
! ! |
|
10485 | 41 |
|
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
42 |
!LintHighlighter class methodsFor:'instance creation'! |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
43 |
|
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
44 |
new |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
45 |
"return an initialized instance" |
10485 | 46 |
|
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
47 |
^ self basicNew initialize. |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
48 |
! ! |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
49 |
|
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
50 |
!LintHighlighter methodsFor:'accessing'! |
13829 | 51 |
|
10485 | 52 |
rules |
53 |
^ rules |
|
54 |
! |
|
55 |
||
11380 | 56 |
rules:aCollectionOfRules |
57 |
rules := aCollectionOfRules. |
|
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
58 |
rulesToIntervalsMap := nil. |
11380 | 59 |
|
60 |
"Modified (format): / 07-03-2012 / 17:24:02 / cg" |
|
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
61 |
"Modified: / 15-12-2014 / 20:25:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
62 |
! |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
63 |
|
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
64 |
rulesToIntervalsMap |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
65 |
^ rulesToIntervalsMap |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
66 |
|
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
67 |
"Created: / 15-12-2014 / 15:20:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
68 |
! |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
69 |
|
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
70 |
sequenceNumber |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
71 |
^ sequenceNumber |
10485 | 72 |
! ! |
73 |
||
74 |
!LintHighlighter methodsFor:'accessing-emphasis'! |
|
75 |
||
76 |
emphasisForError |
|
11394 | 77 |
|warnColor| |
10485 | 78 |
|
79 |
emphasisError isNil ifTrue:[ |
|
11394 | 80 |
warnColor := Color red. |
15038 | 81 |
emphasisError := Array |
82 |
"/with: #backgroundColor -> warnColor lightened lightened |
|
83 |
with: #underwave |
|
84 |
with: #underlineColor -> warnColor |
|
10485 | 85 |
]. |
86 |
^emphasisError |
|
87 |
||
88 |
"Created: / 05-08-2011 / 09:31:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11394 | 89 |
"Modified: / 08-03-2012 / 03:00:51 / cg" |
13829 | 90 |
"Modified: / 20-04-2012 / 18:29:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 91 |
! |
92 |
||
93 |
emphasisForInformation |
|
11394 | 94 |
|warnColor| |
10485 | 95 |
|
96 |
emphasisInformation isNil ifTrue:[ |
|
19617
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
97 |
warnColor := Color rgbValue: 16r78dce8. |
15038 | 98 |
emphasisInformation := Array |
13829 | 99 |
"/with: #backgroundColor -> warnColor lightened lightened |
15038 | 100 |
with: #underwave |
101 |
with: #underlineColor -> warnColor |
|
10485 | 102 |
]. |
103 |
^emphasisInformation |
|
104 |
||
105 |
"Created: / 05-08-2011 / 09:31:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11394 | 106 |
"Modified: / 08-03-2012 / 03:01:22 / cg" |
13829 | 107 |
"Modified: / 20-04-2012 / 18:29:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
19617
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
108 |
"Modified: / 05-11-2021 / 14:22:21 / Patrik Svestka <patrik.svestka@gmail.com>" |
10485 | 109 |
! |
110 |
||
111 |
emphasisForSeverity: severity |
|
112 |
||
113 |
severity == #error ifTrue:[^self emphasisForError]. |
|
114 |
severity == #information ifTrue:[^self emphasisForInformation]. |
|
115 |
||
116 |
^self emphasisForWarning |
|
117 |
||
118 |
"Created: / 05-08-2011 / 09:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
119 |
! |
|
120 |
||
121 |
emphasisForWarning |
|
11394 | 122 |
|warnColor| |
10485 | 123 |
|
124 |
emphasisWarning isNil ifTrue:[ |
|
15696
0f6aaa582319
class: Tools::LintHighlighter
Claus Gittinger <cg@exept.de>
parents:
15125
diff
changeset
|
125 |
warnColor := Color yellow slightlyDarkened. "/ (Color redByte: 224 greenByte: 200 blueByte: 45). |
15038 | 126 |
emphasisWarning := Array |
13829 | 127 |
"/with: #backgroundColor -> warnColor lightened lightened |
15038 | 128 |
with: #underwave |
129 |
with: #underlineColor -> warnColor |
|
10485 | 130 |
]. |
131 |
^emphasisWarning |
|
132 |
||
133 |
"Created: / 05-08-2011 / 09:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11394 | 134 |
"Modified: / 08-03-2012 / 03:00:19 / cg" |
13829 | 135 |
"Modified: / 20-04-2012 / 18:29:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 136 |
! ! |
137 |
||
138 |
!LintHighlighter methodsFor:'formatting'! |
|
139 |
||
140 |
formatClassDefinition:source in:class |
|
141 |
||
142 |
formattingMethod := false. |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
143 |
^ self format: source in: class |
10485 | 144 |
|
145 |
"Created: / 04-08-2011 / 23:44:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
146 |
"Modified: / 02-12-2014 / 11:29:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 147 |
! |
148 |
||
149 |
formatClassDefinition:source in:class elementsInto: elements |
|
150 |
||
151 |
formattingMethod := false. |
|
15823
682d7a61504c
class: Tools::LintHighlighter
Claus Gittinger <cg@exept.de>
parents:
15811
diff
changeset
|
152 |
^ self format: source asString asText in: class |
10485 | 153 |
|
154 |
"Created: / 04-08-2011 / 23:44:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
155 |
"Modified: / 02-12-2014 / 11:29:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 156 |
! |
157 |
||
158 |
formatExpression:source in:class |
|
159 |
||
160 |
formattingMethod := false. |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
161 |
^ self format: source in: class |
10485 | 162 |
|
163 |
"Created: / 04-08-2011 / 23:45:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
164 |
"Modified: / 02-12-2014 / 11:29:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 165 |
! |
166 |
||
167 |
formatExpression:source in:class elementsInto: elements |
|
168 |
||
169 |
formattingMethod := false. |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
170 |
^ self format: source in: class |
10485 | 171 |
|
172 |
"Created: / 04-08-2011 / 23:43:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
173 |
"Modified: / 02-12-2014 / 11:29:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 174 |
! |
175 |
||
176 |
formatMethod:mth source:source in:class using: preferences |
|
177 |
||
178 |
formattingMethod := true. |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
179 |
^ self format: source in: class |
10485 | 180 |
|
181 |
"Created: / 04-08-2011 / 23:45:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
182 |
"Modified: / 02-12-2014 / 11:29:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 183 |
! |
184 |
||
16606 | 185 |
formatMethod:mth source:sourceString in:class using: preferences elementsInto: elements |
10485 | 186 |
|
187 |
formattingMethod := true. |
|
16606 | 188 |
^ self format: sourceString in: class |
10485 | 189 |
|
190 |
"Created: / 04-08-2011 / 23:42:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
191 |
"Modified: / 02-12-2014 / 11:30:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 192 |
! ! |
193 |
||
194 |
!LintHighlighter methodsFor:'formatting-private'! |
|
195 |
||
16606 | 196 |
format: sourceString in: class |
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
197 |
| tree t | |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
198 |
|
17050 | 199 |
tree := RBParser |
200 |
parseMethod: sourceString string |
|
201 |
onError:[:error :pos| ^ sourceString ]. |
|
16606 | 202 |
t := sourceString asText. |
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
203 |
self format: t tree: tree in: class. |
14096
3d2f347c2cbc
class: Tools::LintHighlighter
Claus Gittinger <cg@exept.de>
parents:
14068
diff
changeset
|
204 |
^t |
10485 | 205 |
|
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
206 |
"Created: / 02-12-2014 / 11:27:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
207 |
"Modified: / 15-12-2014 / 18:42:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 208 |
! |
209 |
||
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
210 |
format: text tree: tree in: class |
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
211 |
rulesToIntervalsMap := Dictionary new. |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
212 |
sequenceNumber := sequenceNumber + 1. |
13829 | 213 |
rules ? #() do:[:rule| |
17050 | 214 |
rule isEmpty ifFalse:[ |
215 |
self format: text tree: tree in: class rule: rule |
|
216 |
]. |
|
13829 | 217 |
]. |
218 |
^text |
|
219 |
||
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
220 |
"Created: / 02-12-2014 / 11:28:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
221 |
"Modified: / 15-12-2014 / 18:43:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13829 | 222 |
! |
223 |
||
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
224 |
format: text tree: tree in: class rule: rule |
17091 | 225 |
| string | |
13829 | 226 |
|
227 |
string := text string. |
|
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
228 |
"rule result isParseTreeEnvironment"true ifTrue:[ |
13829 | 229 |
formattingMethod ifTrue:[ |
17091 | 230 |
rule |
231 |
resultSelectionIntervalsForSource: string tree: tree in: class |
|
232 |
do: [:interval| |
|
233 |
interval notEmptyOrNil ifTrue:[ |
|
17301 | 234 |
((interval first == 1 and:[interval last == text size]) or:[interval last > text size]) ifTrue:[ |
17091 | 235 |
self debuggingCodeFor:#jv is:[ |
236 |
Transcript showCR:'>> no meaningful selection interval for ' , rule printString. |
|
237 |
]. |
|
238 |
] ifFalse:[ |
|
239 |
self mark: text from: interval first to: interval last for: rule. |
|
240 |
] |
|
13829 | 241 |
] |
17091 | 242 |
]. |
13829 | 243 |
]. |
244 |
] ifFalse: [ |
|
245 |
| searches | |
|
246 |
||
247 |
searches := rule result searchStrings asSet. |
|
248 |
||
249 |
searches do:[:search| |
|
250 |
| i | |
|
251 |
i := 1. |
|
15038 | 252 |
[ |
13829 | 253 |
i := string findString: search startingAt: i. |
254 |
i ~~ 0 |
|
255 |
] whileTrue:[ |
|
256 |
self mark: text from: i to: (i + search size - 1) for: rule. |
|
257 |
i := i + search size + 1. |
|
258 |
] |
|
15038 | 259 |
|
13829 | 260 |
|
261 |
] |
|
262 |
] |
|
263 |
||
14965
02bfa1f4aa9a
When highlighing rules, pass a class to selectionIntervals so the highlighter/searcher
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14096
diff
changeset
|
264 |
"Created: / 02-12-2014 / 11:28:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
265 |
"Modified (format): / 15-12-2014 / 18:58:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17091 | 266 |
"Modified (format): / 19-11-2016 / 13:35:25 / cg" |
17301 | 267 |
"Modified: / 30-01-2017 / 14:51:18 / stefan" |
13829 | 268 |
! ! |
269 |
||
270 |
!LintHighlighter methodsFor:'initialization'! |
|
271 |
||
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
272 |
initialize |
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
273 |
sequenceNumber := 0. |
13829 | 274 |
! ! |
275 |
||
276 |
!LintHighlighter methodsFor:'markup'! |
|
277 |
||
278 |
mark: text from: start to: end for: rule |
|
15811
e6f8c138b759
class: Tools::LintHighlighter
Claus Gittinger <cg@exept.de>
parents:
15696
diff
changeset
|
279 |
"this underwaves the rule's complaint" |
e6f8c138b759
class: Tools::LintHighlighter
Claus Gittinger <cg@exept.de>
parents:
15696
diff
changeset
|
280 |
|
13829 | 281 |
| emphasis | |
282 |
||
283 |
emphasis := self emphasisForSeverity: rule severity. |
|
15038 | 284 |
text emphasisFrom: start to: end add: emphasis. |
285 |
(rulesToIntervalsMap at: rule ifAbsentPut: [ Set new ]) |
|
286 |
add: (start to: end) |
|
13829 | 287 |
|
288 |
"Created: / 30-01-2012 / 15:30:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
15031
fd2c24c7f230
LintHighlighter/.LintService refactored to show multiple rules at line...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14965
diff
changeset
|
289 |
"Modified: / 15-12-2014 / 15:52:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10485 | 290 |
! ! |
291 |
||
292 |
!LintHighlighter class methodsFor:'documentation'! |
|
293 |
||
294 |
version |
|
15696
0f6aaa582319
class: Tools::LintHighlighter
Claus Gittinger <cg@exept.de>
parents:
15125
diff
changeset
|
295 |
^ '$Header$' |
10485 | 296 |
! |
297 |
||
298 |
version_CVS |
|
15696
0f6aaa582319
class: Tools::LintHighlighter
Claus Gittinger <cg@exept.de>
parents:
15125
diff
changeset
|
299 |
^ '$Header$' |
19617
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
300 |
! |
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
301 |
|
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
302 |
version_HG |
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
303 |
|
96a62e7ef902
Tools::LintHighlighter warning blue color to support dark skin
Patrik Svestka <patrik.svestka@gmail.com>
parents:
18532
diff
changeset
|
304 |
^ '$Changeset: <not expanded> $' |
10485 | 305 |
! ! |
13829 | 306 |