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