author | Claus Gittinger <cg@exept.de> |
Mon, 20 Jan 2020 21:02:47 +0100 | |
changeset 19422 | c6ca1c3e0fd7 |
parent 19147 | be73fa3b245f |
permissions | -rw-r--r-- |
19086 | 1 |
"{ Encoding: utf8 }" |
2 |
||
10000 | 3 |
" |
10096 | 4 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
5 |
Copyright (c) 2009-2010 eXept Software AG |
|
10000 | 6 |
|
10096 | 7 |
Permission is hereby granted, free of charge, to any person |
8 |
obtaining a copy of this software and associated documentation |
|
9 |
files (the 'Software'), to deal in the Software without |
|
10 |
restriction, including without limitation the rights to use, |
|
11 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
12 |
copies of the Software, and to permit persons to whom the |
|
13 |
Software is furnished to do so, subject to the following |
|
14 |
conditions: |
|
15 |
||
16 |
The above copyright notice and this permission notice shall be |
|
17 |
included in all copies or substantial portions of the Software. |
|
18 |
||
19 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
21 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
22 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
23 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
24 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
25 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
26 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10000 | 27 |
" |
28 |
"{ Package: 'stx:libtool' }" |
|
29 |
||
30 |
"{ NameSpace: Tools }" |
|
31 |
||
32 |
BrowserList subclass:#LintRuleList |
|
33 |
instanceVariableNames:'listHolder filterHolder modeHolder listSelection listView |
|
34 |
initialSelectionHolder' |
|
14978 | 35 |
classVariableNames:'LastNameFilter' |
10000 | 36 |
poolDictionaries:'' |
37 |
category:'Interface-Lint' |
|
38 |
! |
|
39 |
||
40 |
HierarchicalItem subclass:#ListEntry |
|
41 |
instanceVariableNames:'x rule application' |
|
42 |
classVariableNames:'' |
|
43 |
poolDictionaries:'' |
|
44 |
privateIn:LintRuleList |
|
45 |
! |
|
46 |
||
47 |
!LintRuleList class methodsFor:'documentation'! |
|
48 |
||
49 |
copyright |
|
50 |
" |
|
10096 | 51 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
52 |
Copyright (c) 2009-2010 eXept Software AG |
|
53 |
||
54 |
Permission is hereby granted, free of charge, to any person |
|
55 |
obtaining a copy of this software and associated documentation |
|
56 |
files (the 'Software'), to deal in the Software without |
|
57 |
restriction, including without limitation the rights to use, |
|
58 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
59 |
copies of the Software, and to permit persons to whom the |
|
60 |
Software is furnished to do so, subject to the following |
|
61 |
conditions: |
|
10000 | 62 |
|
10096 | 63 |
The above copyright notice and this permission notice shall be |
64 |
included in all copies or substantial portions of the Software. |
|
65 |
||
66 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
67 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
68 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
69 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
70 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
71 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
72 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
73 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10000 | 74 |
" |
14754
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
75 |
! |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
76 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
77 |
documentation |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
78 |
" |
17298 | 79 |
Embeddable list to display a set of SmallLint rules. |
80 |
(this is embedded in the browser when showing lint check outcomes) |
|
14754
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
81 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
82 |
Supports 3 modes (controlled by modeHolder) |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
83 |
#display - only display given set of rules. |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
84 |
#displaySelection - display set of rules and indicate which one is selected |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
85 |
by check mark. Does NOT ALLOW to change selection |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
86 |
(add remove tools) |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
87 |
#select - display set of rules and DO ALLOW to change the selection |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
88 |
(add / remove rules) by clicking to check icon |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
89 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
90 |
[author:] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
91 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
92 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
93 |
[instance variables:] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
94 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
95 |
[class variables:] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
96 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
97 |
[see also:] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
98 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
99 |
" |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
100 |
! |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
101 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
102 |
examples |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
103 |
" |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
104 |
Starting the application: |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
105 |
[exBegin] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
106 |
Tools::LintRuleList open |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
107 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
108 |
[exEnd] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
109 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
110 |
more examples to be added: |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
111 |
[exBegin] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
112 |
... add code fragment for |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
113 |
... executable example here ... |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
114 |
[exEnd] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
115 |
" |
10000 | 116 |
! ! |
117 |
||
118 |
!LintRuleList class methodsFor:'interface specs'! |
|
119 |
||
120 |
windowSpec |
|
121 |
"This resource specification was automatically generated |
|
122 |
by the UIPainter of ST/X." |
|
123 |
||
124 |
"Do not manually edit this!! If it is corrupted, |
|
125 |
the UIPainter may not be able to read the specification." |
|
126 |
||
127 |
" |
|
128 |
UIPainter new openOnClass:Tools::LintRuleList andSelector:#windowSpec |
|
129 |
Tools::LintRuleList new openInterface:#windowSpec |
|
130 |
Tools::LintRuleList open |
|
131 |
" |
|
132 |
||
133 |
<resource: #canvas> |
|
134 |
||
135 |
^ |
|
16589 | 136 |
#(FullSpec |
137 |
name: windowSpec |
|
138 |
window: |
|
139 |
(WindowSpec |
|
140 |
label: 'SmallLintRuleList' |
|
141 |
name: 'SmallLintRuleList' |
|
142 |
min: (Point 10 10) |
|
143 |
bounds: (Rectangle 0 0 300 300) |
|
144 |
) |
|
145 |
component: |
|
146 |
(SpecCollection |
|
147 |
collection: ( |
|
148 |
(InputFieldSpec |
|
149 |
name: 'RuleFilter' |
|
150 |
layout: (LayoutFrame 0 0 0 0 0 1 28 0) |
|
151 |
model: filterHolder |
|
152 |
immediateAccept: true |
|
153 |
acceptOnReturn: true |
|
154 |
acceptOnTab: true |
|
155 |
acceptOnPointerLeave: true |
|
156 |
emptyFieldReplacementText: 'Search...' |
|
10000 | 157 |
) |
16589 | 158 |
(SelectionInListModelViewSpec |
159 |
name: 'RuleList' |
|
160 |
layout: (LayoutFrame 0 0 28 0 0 1 0 1) |
|
161 |
model: listSelection |
|
162 |
menu: menuHolder |
|
163 |
hasHorizontalScrollBar: true |
|
164 |
hasVerticalScrollBar: true |
|
165 |
listModel: listHolder |
|
166 |
multipleSelectOk: true |
|
167 |
useIndex: false |
|
168 |
highlightMode: line |
|
169 |
postBuildCallback: postBuildList: |
|
170 |
) |
|
171 |
) |
|
172 |
||
173 |
) |
|
174 |
) |
|
10000 | 175 |
! ! |
176 |
||
177 |
!LintRuleList class methodsFor:'menu specs'! |
|
178 |
||
179 |
menu |
|
180 |
"This resource specification was automatically generated |
|
181 |
by the MenuEditor of ST/X." |
|
182 |
||
183 |
"Do not manually edit this!! If it is corrupted, |
|
184 |
the MenuEditor may not be able to read the specification." |
|
185 |
||
11381 | 186 |
|
10000 | 187 |
" |
11381 | 188 |
MenuEditor new openOnClass:Tools::LintRuleList andSelector:#menu |
189 |
(Menu new fromLiteralArrayEncoding:(Tools::LintRuleList menu)) startUp |
|
10000 | 190 |
" |
191 |
||
192 |
<resource: #menu> |
|
193 |
||
194 |
^ |
|
195 |
#(Menu |
|
196 |
( |
|
197 |
(MenuItem |
|
16438 | 198 |
label: 'Run this Rule Again' |
199 |
itemValue: runRuleAgain |
|
200 |
) |
|
201 |
(MenuItem |
|
10000 | 202 |
label: '-' |
203 |
) |
|
204 |
(MenuItem |
|
16438 | 205 |
label: 'Inspect Rule' |
206 |
itemValue: menuInspectRule |
|
207 |
) |
|
208 |
(MenuItem |
|
209 |
label: 'Browse Rule Class' |
|
210 |
itemValue: menuBrowseRuleClass |
|
10000 | 211 |
) |
212 |
) |
|
213 |
nil |
|
214 |
nil |
|
215 |
) |
|
216 |
! ! |
|
217 |
||
218 |
!LintRuleList class methodsFor:'plugIn spec'! |
|
219 |
||
220 |
aspectSelectors |
|
221 |
"This resource specification was automatically generated |
|
222 |
by the UIPainter of ST/X." |
|
223 |
||
224 |
"Do not manually edit this. If it is corrupted, |
|
225 |
the UIPainter may not be able to read the specification." |
|
226 |
||
227 |
"Return a description of exported aspects; |
|
228 |
these can be connected to aspects of an embedding application |
|
229 |
(if this app is embedded in a subCanvas)." |
|
230 |
||
231 |
^ #( |
|
16589 | 232 |
#environmentHolder |
10000 | 233 |
#inGeneratorHolder |
13798 | 234 |
#listSelection |
10000 | 235 |
#modeHolder |
236 |
#outGeneratorHolder |
|
237 |
#selectionHolder |
|
238 |
). |
|
239 |
||
240 |
! ! |
|
241 |
||
242 |
!LintRuleList methodsFor:'accessing'! |
|
243 |
||
244 |
mode |
|
245 |
||
246 |
^self modeHolder value |
|
247 |
||
17361 | 248 |
"Created: / 25-08-2010 / 11:33:51 / Jan Vrany" |
10000 | 249 |
! |
250 |
||
251 |
selection |
|
252 |
||
253 |
| sel | |
|
254 |
sel := self selectionHolder value. |
|
255 |
sel ifNil:[sel := Set new]. |
|
256 |
^sel |
|
257 |
||
17361 | 258 |
"Created: / 25-08-2010 / 13:26:58 / Jan Vrany" |
10000 | 259 |
! |
260 |
||
261 |
selection: aCollectionOrNil |
|
262 |
||
263 |
| sel | |
|
264 |
sel := aCollectionOrNil |
|
265 |
ifNil:[Set new] |
|
266 |
ifNotNil:[aCollectionOrNil asSet]. |
|
267 |
||
13798 | 268 |
self selectionHolder value: sel. |
10000 | 269 |
|
17361 | 270 |
"Created: / 25-08-2010 / 13:28:43 / Jan Vrany" |
271 |
"Modified: / 25-08-2010 / 15:29:35 / Jan Vrany" |
|
13798 | 272 |
"Modified: / 27-02-2013 / 23:33:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 273 |
! ! |
274 |
||
275 |
!LintRuleList methodsFor:'aspects'! |
|
276 |
||
277 |
filterHolder |
|
278 |
"return/create the 'filterHolder' value holder (automatically generated)" |
|
279 |
||
280 |
filterHolder isNil ifTrue:[ |
|
14978 | 281 |
filterHolder := LastNameFilter asValue. |
10000 | 282 |
filterHolder addDependent:self. |
283 |
]. |
|
284 |
^ filterHolder |
|
285 |
! |
|
286 |
||
287 |
filterHolder:something |
|
288 |
"set the 'filterHolder' value holder (automatically generated)" |
|
289 |
||
290 |
|oldValue newValue| |
|
291 |
||
292 |
filterHolder notNil ifTrue:[ |
|
293 |
oldValue := filterHolder value. |
|
294 |
filterHolder removeDependent:self. |
|
295 |
]. |
|
296 |
filterHolder := something. |
|
297 |
filterHolder notNil ifTrue:[ |
|
298 |
filterHolder addDependent:self. |
|
299 |
]. |
|
300 |
newValue := filterHolder value. |
|
301 |
oldValue ~~ newValue ifTrue:[ |
|
302 |
self update:#value with:newValue from:filterHolder. |
|
303 |
]. |
|
304 |
! |
|
305 |
||
306 |
listHolder |
|
307 |
"return/create the 'ruleList' value holder (automatically generated)" |
|
308 |
||
309 |
listHolder isNil ifTrue:[ |
|
310 |
listHolder := ValueHolder new. |
|
311 |
]. |
|
312 |
^ listHolder |
|
313 |
! |
|
314 |
||
315 |
listSelection |
|
316 |
"return/create the 'listSelection' value holder (automatically generated)" |
|
317 |
||
318 |
listSelection isNil ifTrue:[ |
|
319 |
listSelection := ValueHolder new. |
|
320 |
listSelection addDependent:self. |
|
321 |
]. |
|
322 |
^ listSelection |
|
323 |
! |
|
324 |
||
325 |
listSelection:something |
|
326 |
"set the 'listSelection' value holder (automatically generated)" |
|
327 |
||
328 |
|oldValue newValue| |
|
329 |
||
330 |
listSelection notNil ifTrue:[ |
|
331 |
oldValue := listSelection value. |
|
332 |
listSelection removeDependent:self. |
|
333 |
]. |
|
334 |
listSelection := something. |
|
335 |
listSelection notNil ifTrue:[ |
|
336 |
listSelection addDependent:self. |
|
337 |
]. |
|
338 |
newValue := listSelection value. |
|
339 |
oldValue ~~ newValue ifTrue:[ |
|
340 |
self update:#value with:newValue from:listSelection. |
|
341 |
]. |
|
342 |
! |
|
343 |
||
344 |
modeHolder |
|
16438 | 345 |
"the mode - can run in select or in display modes. |
346 |
select is to choose a set of rules; |
|
347 |
display for presentation of results (in a browser). |
|
348 |
See documentation for details" |
|
349 |
||
350 |
modeHolder isNil ifTrue:[ |
|
351 |
modeHolder := ValueHolder with: #display |
|
352 |
]. |
|
10000 | 353 |
^modeHolder |
354 |
||
355 |
"Modified: / 15-04-2010 / 20:56:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
356 |
! |
|
357 |
||
358 |
modeHolder:aValueModel |
|
16438 | 359 |
"the mode - can run in select or in display modes. |
360 |
select is to choose a set of rules; |
|
361 |
display for presentation of results (in a browser). |
|
362 |
See documentation for details" |
|
363 |
||
10000 | 364 |
modeHolder := aValueModel. |
365 |
! |
|
366 |
||
367 |
selectedLintRules |
|
368 |
^ self selectionHolder |
|
369 |
||
370 |
"Created: / 02-02-2010 / 20:43:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
371 |
! |
|
372 |
||
373 |
selectedLintRules: anObject |
|
374 |
^ self selectionHolder: anObject |
|
375 |
||
376 |
"Created: / 02-02-2010 / 20:43:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
377 |
! ! |
|
378 |
||
379 |
!LintRuleList methodsFor:'change & update'! |
|
380 |
||
381 |
delayedUpdate:something with:aParameter from:changedObject |
|
382 |
"Invoked when an object that I depend upon sends a change notification." |
|
383 |
||
384 |
changedObject == filterHolder ifTrue:[ |
|
14978 | 385 |
LastNameFilter := filterHolder value. |
10000 | 386 |
self updateList. |
387 |
^ self. |
|
388 |
]. |
|
389 |
||
390 |
(changedObject == listSelection) ifTrue:[ |
|
391 |
listValid ifFalse:[ |
|
392 |
self updateList. |
|
393 |
]. |
|
394 |
^ self selectionChanged |
|
395 |
]. |
|
396 |
||
10499 | 397 |
(changedObject == selectionHolder) ifTrue:[ |
13798 | 398 |
listView notNil ifTrue:[ |
399 |
listView invalidate |
|
400 |
]. |
|
10499 | 401 |
^self. |
402 |
]. |
|
403 |
||
404 |
||
10000 | 405 |
super delayedUpdate:something with:aParameter from:changedObject |
406 |
||
17361 | 407 |
"Created: / 26-08-2010 / 11:43:33 / Jan Vrany" |
13798 | 408 |
"Modified: / 27-02-2013 / 23:40:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10499 | 409 |
! |
410 |
||
411 |
selectionChanged |
|
412 |
||
16426 | 413 |
| selection newSelection | |
14169
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
414 |
|
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
415 |
super selectionChanged. |
14786
6761e919308a
Bugfix in selection handling.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14755
diff
changeset
|
416 |
self mode == #display ifTrue:[ |
14169
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
417 |
selection := self listSelection value. |
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
418 |
selection isEmptyOrNil ifTrue:[ |
16426 | 419 |
newSelection := selection |
14169
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
420 |
] ifFalse:[ |
16426 | 421 |
newSelection := selection collect:[:entry|entry rule] |
14169
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
422 |
]. |
16426 | 423 |
self selectionHolder value: newSelection. |
14855 | 424 |
"/ listView invalidate |
14169
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
425 |
]. |
10499 | 426 |
|
427 |
"Created: / 05-08-2011 / 00:10:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14786
6761e919308a
Bugfix in selection handling.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14755
diff
changeset
|
428 |
"Modified: / 17-10-2014 / 00:01:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 429 |
! ! |
430 |
||
431 |
!LintRuleList methodsFor:'event processing'! |
|
432 |
||
433 |
buttonPress:button x:x y:y view:aView |
|
434 |
||
435 |
| itemIndex item | |
|
436 |
||
16438 | 437 |
(button == 1 and:[self modeHolder value == #select]) ifFalse:[ |
438 |
^ aView buttonPress:button x:x y:y |
|
439 |
]. |
|
10000 | 440 |
|
441 |
itemIndex := aView yVisibleToLineNr:y. |
|
14755 | 442 |
itemIndex isNil ifTrue:[^self]. |
10000 | 443 |
itemIndex == 0 ifTrue:[^self]. |
444 |
itemIndex > aView list size ifTrue:[^self]. |
|
445 |
item := aView list at: itemIndex. |
|
446 |
||
447 |
((aView left + x) between: (item x) and: (item x + 16)) |
|
448 |
ifFalse:[^aView buttonPress:button x:x y:y]. |
|
449 |
||
450 |
item checked: item checked not. |
|
451 |
aView invalidate |
|
452 |
||
453 |
"Created: / 08-12-2009 / 14:12:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14755 | 454 |
"Modified: / 13-10-2014 / 18:38:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 455 |
! |
456 |
||
457 |
handlesButtonPress:button inView:aView |
|
14923
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
458 |
^ listView == aView |
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
459 |
and:[ button == 1 |
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
460 |
and:[ self modeHolder value == #select ] ] |
10000 | 461 |
|
462 |
"Created: / 08-12-2009 / 14:08:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14923
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
463 |
"Modified: / 27-11-2014 / 09:18:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 464 |
! ! |
465 |
||
466 |
!LintRuleList methodsFor:'generators'! |
|
467 |
||
468 |
makeGenerator |
|
469 |
||
16426 | 470 |
self modeHolder value == #display ifTrue:[ |
471 |
^ Iterator |
|
472 |
on: [:whatToDo| |
|
473 |
self listSelection value ? #() do:[:each| |
|
16875 | 474 |
"/ classes removed (in the meanwhile), but still referenced by name in the lintResults |
475 |
"/ may lead to nil being enumerated here... |
|
476 |
each failedClasses nonNilElementsDo:whatToDo |
|
16426 | 477 |
] |
478 |
] |
|
479 |
]. |
|
480 |
^ Iterator |
|
481 |
on: [:whatToDo| |
|
482 |
self selection do:[:rule| whatToDo value: rule] |
|
483 |
]. |
|
10000 | 484 |
|
485 |
"Modified: / 16-04-2010 / 12:13:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
17361 | 486 |
"Modified: / 25-08-2010 / 13:39:51 / Jan Vrany" |
10000 | 487 |
! ! |
488 |
||
489 |
!LintRuleList methodsFor:'hooks'! |
|
490 |
||
491 |
commonPostOpen |
|
12035 | 492 |
super commonPostOpen. |
10000 | 493 |
self updateOutputGenerator. |
494 |
||
495 |
"Created: / 16-04-2010 / 11:53:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
496 |
! |
|
497 |
||
498 |
postBuildList: aView |
|
18117 | 499 |
"I want to see the events of the list" |
10000 | 500 |
|
501 |
listView := aView scrolledView. |
|
502 |
listView delegate: self. |
|
503 |
||
504 |
"Created: / 08-12-2009 / 14:10:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
505 |
! ! |
|
506 |
||
507 |
!LintRuleList methodsFor:'initialization'! |
|
508 |
||
509 |
initialize |
|
14033
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
510 |
| menu | |
10000 | 511 |
|
512 |
super initialize. |
|
16438 | 513 |
|
514 |
menuHolder := |
|
515 |
[ |
|
516 |
menu := self menuFor: #menu. |
|
517 |
menu isArray ifTrue:[ menu := Menu decodeFromLiteralArray: menu ]. |
|
518 |
menu |
|
519 |
]. |
|
520 |
||
14855 | 521 |
"/ self selection: Set new. |
10000 | 522 |
|
17361 | 523 |
"Modified: / 25-08-2010 / 15:24:45 / Jan Vrany" |
14033
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
524 |
"Modified: / 24-02-2014 / 12:00:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 525 |
! ! |
526 |
||
527 |
!LintRuleList methodsFor:'menu actions'! |
|
528 |
||
16438 | 529 |
menuBrowseRuleClass |
19147 | 530 |
| selection numSelected | |
10000 | 531 |
|
16438 | 532 |
selection := self listSelection value. |
19147 | 533 |
numSelected := selection size. |
534 |
numSelected == 1 ifTrue:[selection anyOne rule class browse]. |
|
535 |
numSelected > 1 ifTrue:[SystemBrowser |
|
16438 | 536 |
browseClasses:(selection collect:[:e|e rule class]) |
537 |
label:'Rule classes']. |
|
538 |
! |
|
539 |
||
540 |
menuInspectRule |
|
19147 | 541 |
| selection numSelected | |
16438 | 542 |
|
10000 | 543 |
selection := self listSelection value. |
19147 | 544 |
numSelected := selection size. |
545 |
numSelected == 1 ifTrue:[selection anyOne rule inspect]. |
|
546 |
numSelected > 1 ifTrue:[(selection collect:[:e|e rule]) inspect]. |
|
16438 | 547 |
! |
10000 | 548 |
|
16438 | 549 |
runRuleAgain |
550 |
self selectedLintRules value do:[:eachRule | |
|
551 |
eachRule run. |
|
552 |
]. |
|
16442 | 553 |
"/ self updateList. |
554 |
self updateOutputGenerator |
|
10000 | 555 |
! ! |
556 |
||
557 |
!LintRuleList methodsFor:'private'! |
|
558 |
||
559 |
listEntryFor: anRBLintRule |
|
560 |
||
561 |
| entry | |
|
562 |
entry := ListEntry new |
|
563 |
rule: anRBLintRule; |
|
564 |
application: self; |
|
565 |
expand; |
|
566 |
yourself. |
|
567 |
^entry |
|
568 |
||
569 |
"Created: / 15-04-2010 / 18:59:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
17361 | 570 |
"Modified: / 25-08-2010 / 14:15:46 / Jan Vrany" |
10000 | 571 |
! |
572 |
||
573 |
makeDependent |
|
574 |
||
575 |
"nothing to do" |
|
576 |
||
577 |
"Created: / 02-02-2010 / 20:23:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
578 |
! |
|
579 |
||
580 |
makeIndependent |
|
581 |
||
582 |
"nothing to do" |
|
583 |
||
584 |
"Created: / 02-02-2010 / 20:23:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
585 |
! |
|
586 |
||
587 |
rules: rules includes: rule |
|
588 |
||
589 |
^rules contains: |
|
590 |
[:each| |
|
591 |
each class == rule class and: |
|
592 |
[each name = rule name]] |
|
593 |
||
17361 | 594 |
"Created: / 26-08-2010 / 12:04:04 / Jan Vrany" |
10000 | 595 |
! |
596 |
||
14855 | 597 |
setListValid:aBoolean |
14945 | 598 |
"/ listValid ifTrue:[ |
599 |
"/ aBoolean ifFalse:[self halt]. |
|
600 |
"/ ]. |
|
14855 | 601 |
listValid := aBoolean. |
602 |
! |
|
603 |
||
10000 | 604 |
updateList |
605 |
|generator filterS newList| |
|
606 |
||
607 |
generator := self inGeneratorHolder value. |
|
608 |
filterS := self filterHolder value. |
|
10455 | 609 |
filterS notEmptyOrNil ifTrue:[ |
610 |
(filterS startsWith: $*) ifFalse:[filterS := '*' , filterS]. |
|
611 |
(filterS endsWith: $*) ifFalse:[filterS := filterS , '*'] |
|
612 |
]. |
|
613 |
(generator isNil and:[self mode == #display]) ifTrue:[ |
|
614 |
generator := RBCompositeLintRule allRules flattened |
|
615 |
]. |
|
10000 | 616 |
newList := OrderedCollection new. |
617 |
generator do:[:rule | |
|
10455 | 618 |
rule flattened do: [:rule| |
14667 | 619 |
(filterS isEmptyOrNil |
17009 | 620 |
or:[(rule name matches: filterS caseSensitive:false) |
621 |
or:[rule class name matches: filterS caseSensitive:false]]) |
|
10455 | 622 |
ifTrue:[ |
623 |
newList add: (self listEntryFor:rule) |
|
624 |
] |
|
625 |
] |
|
626 |
]. |
|
16872 | 627 |
newList |
628 |
sort:[:a :b | |
|
629 |
|sevA sevB| |
|
630 |
||
631 |
sevA := a rule severityAsInteger. |
|
632 |
sevB := b rule severityAsInteger. |
|
633 |
(sevA > sevB) |
|
634 |
or:[ (sevA == sevB) and:[a rule name < b rule name]]. |
|
635 |
]. |
|
636 |
"/ newList sort:[:a :b | a name < b name]. |
|
10000 | 637 |
self listHolder value:newList. |
14855 | 638 |
self setListValid:true. |
10000 | 639 |
|
640 |
"Modified: / 22-07-2009 / 15:58:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
17361 | 641 |
"Modified: / 25-08-2010 / 13:35:58 / Jan Vrany" |
11381 | 642 |
"Modified: / 07-03-2012 / 18:06:50 / cg" |
14786
6761e919308a
Bugfix in selection handling.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14755
diff
changeset
|
643 |
"Modified: / 16-10-2014 / 23:57:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 644 |
! ! |
645 |
||
10499 | 646 |
!LintRuleList methodsFor:'queries'! |
647 |
||
648 |
supportsSearch |
|
649 |
||
650 |
^false |
|
651 |
||
652 |
"Created: / 04-08-2011 / 23:04:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
653 |
! ! |
|
654 |
||
10000 | 655 |
!LintRuleList methodsFor:'selection'! |
656 |
||
657 |
selectionAdd: rule |
|
658 |
||
659 |
self selection: |
|
660 |
(self selection addAll: rule flattened; yourself) |
|
661 |
||
17361 | 662 |
"Created: / 25-08-2010 / 13:34:57 / Jan Vrany" |
10000 | 663 |
! |
664 |
||
665 |
selectionIncludes: rule |
|
666 |
||
667 |
^self rules: self selection includes: rule |
|
668 |
||
17361 | 669 |
"Created: / 25-08-2010 / 13:30:14 / Jan Vrany" |
670 |
"Modified: / 26-08-2010 / 12:04:19 / Jan Vrany" |
|
10000 | 671 |
! |
672 |
||
673 |
selectionRemove: rule |
|
674 |
||
675 |
| sel rules | |
|
676 |
sel := self selection. |
|
677 |
rules := rule flattened. |
|
678 |
sel := sel reject: |
|
679 |
[:each|self rules: rules includes: each]. |
|
680 |
self selection: sel |
|
681 |
||
17361 | 682 |
"Created: / 25-08-2010 / 13:35:08 / Jan Vrany" |
683 |
"Modified: / 26-08-2010 / 12:05:06 / Jan Vrany" |
|
10000 | 684 |
! ! |
685 |
||
686 |
!LintRuleList::ListEntry class methodsFor:'instance creation'! |
|
687 |
||
688 |
change: aChange |
|
689 |
||
690 |
^self new change: aChange |
|
691 |
||
692 |
"Created: / 24-07-2009 / 22:43:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
693 |
! |
|
694 |
||
695 |
change: aChange application: anApplicationModel |
|
696 |
||
697 |
^self new change: aChange; application: anApplicationModel |
|
698 |
||
699 |
"Created: / 05-12-2009 / 14:16:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
700 |
! |
|
701 |
||
702 |
change: aChange parent: aChangeList |
|
703 |
||
704 |
^self new change: aChange; parent: aChangeList |
|
705 |
||
706 |
"Created: / 25-07-2009 / 23:33:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
707 |
! ! |
|
708 |
||
709 |
!LintRuleList::ListEntry methodsFor:'accessing'! |
|
710 |
||
711 |
application |
|
14169
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
712 |
^ application notNil ifTrue:[application] ifFalse:[super application] |
10000 | 713 |
|
14169
d983f6273b6d
Fixed LintRileList>>selectionChanged so it works both in browser and in dialog. Bit hacky.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14165
diff
changeset
|
714 |
"Modified: / 28-03-2014 / 10:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 715 |
! |
716 |
||
717 |
application:anApplicationModel |
|
718 |
application := anApplicationModel. |
|
719 |
! |
|
720 |
||
721 |
checked |
|
722 |
||
723 |
^rule isComposite |
|
724 |
ifTrue:[self children anySatisfy:[:each|each checked]] |
|
725 |
ifFalse:[self application selectionIncludes: rule] |
|
726 |
||
727 |
"Modified: / 15-04-2010 / 20:59:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
17361 | 728 |
"Modified: / 25-08-2010 / 13:29:33 / Jan Vrany" |
10000 | 729 |
! |
730 |
||
731 |
checked:aBoolean |
|
732 |
||
733 |
| app | |
|
734 |
app := self application. |
|
735 |
aBoolean |
|
736 |
ifTrue: [app selectionAdd: rule] |
|
737 |
ifFalse:[app selectionRemove: rule] |
|
738 |
||
739 |
"Modified: / 15-04-2010 / 19:06:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
17361 | 740 |
"Modified: / 25-08-2010 / 13:35:29 / Jan Vrany" |
10000 | 741 |
! |
742 |
||
743 |
checkedRule |
|
744 |
||
745 |
self checked ifFalse:[^nil]. |
|
746 |
||
747 |
rule isComposite |
|
748 |
ifTrue: |
|
749 |
[^rule copy |
|
750 |
rules: (self children |
|
751 |
collect:[:entry|entry checkedRule] |
|
752 |
thenReject:[:rule|rule isNil]); |
|
753 |
yourself] |
|
754 |
ifFalse: |
|
755 |
[^rule] |
|
756 |
||
757 |
"Created: / 16-04-2010 / 12:06:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
758 |
! |
|
759 |
||
760 |
children |
|
14671 | 761 |
children ifNil:[ |
762 |
rule isComposite ifTrue: [ |
|
763 |
| app | |
|
764 |
||
765 |
app := self application. |
|
766 |
children := rule rules collect:[:eachRule | (app listEntryFor:eachRule) parent:self] |
|
767 |
] ifFalse: [ |
|
768 |
children := #() |
|
769 |
] |
|
770 |
]. |
|
10000 | 771 |
|
772 |
^ children |
|
773 |
||
774 |
"Created: / 25-07-2009 / 23:32:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
775 |
"Modified: / 15-04-2010 / 20:40:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
776 |
! |
|
777 |
||
778 |
failedClasses |
|
779 |
||
780 |
^rule failedClasses |
|
781 |
||
782 |
"Created: / 15-04-2010 / 19:10:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
783 |
! |
|
784 |
||
785 |
failedMethods |
|
786 |
||
787 |
^rule failedMethods |
|
788 |
||
789 |
"Created: / 15-04-2010 / 19:10:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
790 |
! |
|
791 |
||
792 |
failedMethodsInAnyOf: classes meta: meta |
|
793 |
||
794 |
^rule failedMethodsInAnyOf: classes meta: meta |
|
795 |
||
796 |
"Created: / 15-04-2010 / 19:11:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
797 |
! |
|
798 |
||
799 |
label |
|
16872 | 800 |
|s severity| |
801 |
||
802 |
s := rule displayString. |
|
803 |
(severity := rule severity) == #warning ifTrue:[ |
|
804 |
^ s withColor:Color orange. |
|
805 |
]. |
|
806 |
severity == #error ifTrue:[ |
|
19086 | 807 |
^ s allRed. |
16872 | 808 |
]. |
809 |
severity == #information ifFalse:[ |
|
810 |
self halt. |
|
811 |
]. |
|
812 |
^ s |
|
10000 | 813 |
|
814 |
"Modified: / 15-04-2010 / 18:44:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
815 |
! |
|
816 |
||
817 |
name |
|
818 |
||
819 |
^rule name |
|
820 |
||
821 |
"Created: / 15-04-2010 / 19:12:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
822 |
! |
|
823 |
||
824 |
rationale |
|
11315 | 825 |
^ rule rationaleWithAnchor |
10000 | 826 |
|
827 |
"Created: / 15-04-2010 / 19:10:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11315 | 828 |
"Modified: / 01-03-2012 / 20:58:50 / cg" |
10000 | 829 |
! |
830 |
||
11317 | 831 |
rationaleWithAnchor |
832 |
^ rule rationaleWithAnchor |
|
833 |
||
834 |
"Created: / 15-04-2010 / 19:10:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
835 |
"Modified: / 01-03-2012 / 20:58:50 / cg" |
|
836 |
"Created: / 02-03-2012 / 01:04:40 / cg" |
|
837 |
! |
|
838 |
||
10000 | 839 |
rule |
840 |
^ rule |
|
841 |
! |
|
842 |
||
843 |
rule:anRBLintRule |
|
844 |
rule := anRBLintRule. |
|
845 |
! |
|
846 |
||
847 |
x |
|
848 |
^ x ? 0 |
|
849 |
||
850 |
"Modified: / 15-04-2010 / 20:48:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
851 |
! ! |
|
852 |
||
853 |
!LintRuleList::ListEntry methodsFor:'displaying'! |
|
854 |
||
855 |
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
|
16872 | 856 |
self displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:false |
10000 | 857 |
! |
858 |
||
15151 | 859 |
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:isHighlightedAsSelected |
860 |
| cx icon app mode | |
|
861 |
||
862 |
cx := x := newX. |
|
863 |
app := self application. |
|
864 |
mode := app mode. |
|
865 |
mode ~~ #display ifTrue:[ |
|
866 |
mode == #select ifTrue:[ |
|
867 |
icon := self checked |
|
868 |
ifTrue:[app class checkedIcon] |
|
869 |
ifFalse:[app class uncheckedIcon]. |
|
870 |
] ifFalse:[ |
|
871 |
icon := self checked |
|
872 |
ifTrue:[app class checkedIconDisabled] |
|
873 |
ifFalse:[app class uncheckedIconDisabled]. |
|
874 |
]. |
|
875 |
icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2). |
|
876 |
cx := cx + 22."experimental value - this looks good" |
|
877 |
]. |
|
878 |
||
879 |
super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h isHighlightedAsSelected:isHighlightedAsSelected |
|
880 |
||
881 |
"Modified (format): / 07-03-2012 / 20:08:02 / cg" |
|
882 |
"Modified: / 08-10-2014 / 22:56:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
883 |
! |
|
884 |
||
13320
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
885 |
displayOn:aGCOrStream |
10000 | 886 |
|
13320
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
887 |
"/ what a kludge - Dolphin and Squeak mean: printOn: a stream; |
17429 | 888 |
"/ old ST80 means: draw-yourself on a GC. |
13320
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
889 |
(aGCOrStream isStream) ifFalse:[ |
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
890 |
^ super displayOn:aGCOrStream |
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
891 |
]. |
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
892 |
|
13798 | 893 |
rule displayOn:aGCOrStream |
10000 | 894 |
|
895 |
"Created: / 15-04-2010 / 19:13:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13798 | 896 |
"Modified: / 29-11-2013 / 12:59:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17429 | 897 |
"Modified (comment): / 22-02-2017 / 16:49:46 / cg" |
10000 | 898 |
! ! |
899 |
||
900 |
!LintRuleList class methodsFor:'documentation'! |
|
901 |
||
11300
b9accf9080e4
better rationale (link to class)
Claus Gittinger <cg@exept.de>
parents:
11297
diff
changeset
|
902 |
version |
16426 | 903 |
^ '$Header$' |
11300
b9accf9080e4
better rationale (link to class)
Claus Gittinger <cg@exept.de>
parents:
11297
diff
changeset
|
904 |
! |
b9accf9080e4
better rationale (link to class)
Claus Gittinger <cg@exept.de>
parents:
11297
diff
changeset
|
905 |
|
10000 | 906 |
version_CVS |
16426 | 907 |
^ '$Header$' |
10000 | 908 |
! |
909 |
||
910 |
version_SVN |
|
16426 | 911 |
^ '$Id$' |
10000 | 912 |
! ! |
13320
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
913 |