author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 27 Nov 2014 11:39:06 +0100 | |
changeset 14923 | 7c189a24693c |
parent 14855 | 9a7730b0c37d |
child 14945 | 1df6b0965b88 |
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' |
|
33 |
classVariableNames:'' |
|
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 |
" |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
77 |
Embeddable list to display a set of SmallLint rules. |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
78 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
79 |
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
|
80 |
#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
|
81 |
#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
|
82 |
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
|
83 |
(add remove tools) |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
84 |
#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
|
85 |
(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
|
86 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
87 |
[author:] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
88 |
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
|
89 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
90 |
[instance variables:] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
91 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
92 |
[class variables:] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
93 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
94 |
[see also:] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
95 |
|
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 |
examples |
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 |
Starting the application: |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
102 |
[exBegin] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
103 |
Tools::LintRuleList open |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
104 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
105 |
[exEnd] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
106 |
|
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
107 |
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
|
108 |
[exBegin] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
109 |
... 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
|
110 |
... executable example here ... |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
111 |
[exEnd] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
112 |
" |
10000 | 113 |
! ! |
114 |
||
115 |
!LintRuleList class methodsFor:'interface specs'! |
|
116 |
||
117 |
windowSpec |
|
118 |
"This resource specification was automatically generated |
|
119 |
by the UIPainter of ST/X." |
|
120 |
||
121 |
"Do not manually edit this!! If it is corrupted, |
|
122 |
the UIPainter may not be able to read the specification." |
|
123 |
||
124 |
" |
|
125 |
UIPainter new openOnClass:Tools::LintRuleList andSelector:#windowSpec |
|
126 |
Tools::LintRuleList new openInterface:#windowSpec |
|
127 |
Tools::LintRuleList open |
|
128 |
" |
|
129 |
||
130 |
<resource: #canvas> |
|
131 |
||
132 |
^ |
|
133 |
#(FullSpec |
|
134 |
name: windowSpec |
|
135 |
window: |
|
136 |
(WindowSpec |
|
137 |
label: 'SmallLintRuleList' |
|
138 |
name: 'SmallLintRuleList' |
|
139 |
min: (Point 10 10) |
|
140 |
bounds: (Rectangle 0 0 300 300) |
|
141 |
) |
|
142 |
component: |
|
143 |
(SpecCollection |
|
144 |
collection: ( |
|
145 |
(InputFieldSpec |
|
146 |
name: 'RuleFilter' |
|
147 |
layout: (LayoutFrame 0 0 0 0 0 1 22 0) |
|
148 |
model: filterHolder |
|
149 |
immediateAccept: true |
|
150 |
acceptOnReturn: true |
|
151 |
acceptOnTab: true |
|
152 |
acceptOnPointerLeave: true |
|
13798 | 153 |
emptyFieldReplacementText: 'Search...' |
10000 | 154 |
) |
155 |
(SelectionInListModelViewSpec |
|
156 |
name: 'RuleList' |
|
157 |
layout: (LayoutFrame 0 0 23 0 0 1 0 1) |
|
158 |
model: listSelection |
|
159 |
menu: menuHolder |
|
160 |
hasHorizontalScrollBar: true |
|
161 |
hasVerticalScrollBar: true |
|
162 |
listModel: listHolder |
|
163 |
multipleSelectOk: true |
|
164 |
useIndex: false |
|
165 |
highlightMode: line |
|
166 |
postBuildCallback: postBuildList: |
|
167 |
) |
|
168 |
) |
|
169 |
||
170 |
) |
|
171 |
) |
|
172 |
! ! |
|
173 |
||
174 |
!LintRuleList class methodsFor:'menu specs'! |
|
175 |
||
176 |
menu |
|
177 |
"This resource specification was automatically generated |
|
178 |
by the MenuEditor of ST/X." |
|
179 |
||
180 |
"Do not manually edit this!! If it is corrupted, |
|
181 |
the MenuEditor may not be able to read the specification." |
|
182 |
||
11381 | 183 |
|
10000 | 184 |
" |
11381 | 185 |
MenuEditor new openOnClass:Tools::LintRuleList andSelector:#menu |
186 |
(Menu new fromLiteralArrayEncoding:(Tools::LintRuleList menu)) startUp |
|
10000 | 187 |
" |
188 |
||
189 |
<resource: #menu> |
|
190 |
||
191 |
^ |
|
192 |
#(Menu |
|
193 |
( |
|
194 |
(MenuItem |
|
195 |
label: '-' |
|
11381 | 196 |
isVisible: false |
10000 | 197 |
) |
198 |
(MenuItem |
|
199 |
label: 'Inspect' |
|
200 |
itemValue: menuInspect |
|
201 |
translateLabel: true |
|
202 |
) |
|
203 |
) |
|
204 |
nil |
|
205 |
nil |
|
206 |
) |
|
207 |
! ! |
|
208 |
||
209 |
!LintRuleList class methodsFor:'plugIn spec'! |
|
210 |
||
211 |
aspectSelectors |
|
212 |
"This resource specification was automatically generated |
|
213 |
by the UIPainter of ST/X." |
|
214 |
||
215 |
"Do not manually edit this. If it is corrupted, |
|
216 |
the UIPainter may not be able to read the specification." |
|
217 |
||
218 |
"Return a description of exported aspects; |
|
219 |
these can be connected to aspects of an embedding application |
|
220 |
(if this app is embedded in a subCanvas)." |
|
221 |
||
222 |
^ #( |
|
14033
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
223 |
environmentHolder |
10000 | 224 |
#inGeneratorHolder |
13798 | 225 |
#listSelection |
10000 | 226 |
#modeHolder |
227 |
#outGeneratorHolder |
|
228 |
#selectionHolder |
|
229 |
). |
|
230 |
||
14033
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
231 |
"Modified: / 24-02-2014 / 10:37:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 232 |
! ! |
233 |
||
234 |
!LintRuleList methodsFor:'accessing'! |
|
235 |
||
236 |
mode |
|
237 |
||
238 |
^self modeHolder value |
|
239 |
||
240 |
"Created: / 25-08-2010 / 11:33:51 / Jan Vrany <enter your email here>" |
|
241 |
! |
|
242 |
||
243 |
selection |
|
244 |
||
245 |
| sel | |
|
246 |
sel := self selectionHolder value. |
|
247 |
sel ifNil:[sel := Set new]. |
|
248 |
^sel |
|
249 |
||
250 |
"Created: / 25-08-2010 / 13:26:58 / Jan Vrany <enter your email here>" |
|
251 |
! |
|
252 |
||
253 |
selection: aCollectionOrNil |
|
254 |
||
255 |
| sel | |
|
256 |
sel := aCollectionOrNil |
|
257 |
ifNil:[Set new] |
|
258 |
ifNotNil:[aCollectionOrNil asSet]. |
|
259 |
||
13798 | 260 |
self selectionHolder value: sel. |
10000 | 261 |
|
262 |
"Created: / 25-08-2010 / 13:28:43 / Jan Vrany <enter your email here>" |
|
263 |
"Modified: / 25-08-2010 / 15:29:35 / Jan Vrany <enter your email here>" |
|
13798 | 264 |
"Modified: / 27-02-2013 / 23:33:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 265 |
! ! |
266 |
||
267 |
!LintRuleList methodsFor:'aspects'! |
|
268 |
||
269 |
filterHolder |
|
270 |
"return/create the 'filterHolder' value holder (automatically generated)" |
|
271 |
||
272 |
filterHolder isNil ifTrue:[ |
|
273 |
filterHolder := ValueHolder new. |
|
274 |
filterHolder addDependent:self. |
|
275 |
]. |
|
276 |
^ filterHolder |
|
277 |
! |
|
278 |
||
279 |
filterHolder:something |
|
280 |
"set the 'filterHolder' value holder (automatically generated)" |
|
281 |
||
282 |
|oldValue newValue| |
|
283 |
||
284 |
filterHolder notNil ifTrue:[ |
|
285 |
oldValue := filterHolder value. |
|
286 |
filterHolder removeDependent:self. |
|
287 |
]. |
|
288 |
filterHolder := something. |
|
289 |
filterHolder notNil ifTrue:[ |
|
290 |
filterHolder addDependent:self. |
|
291 |
]. |
|
292 |
newValue := filterHolder value. |
|
293 |
oldValue ~~ newValue ifTrue:[ |
|
294 |
self update:#value with:newValue from:filterHolder. |
|
295 |
]. |
|
296 |
! |
|
297 |
||
298 |
listHolder |
|
299 |
"return/create the 'ruleList' value holder (automatically generated)" |
|
300 |
||
301 |
listHolder isNil ifTrue:[ |
|
302 |
listHolder := ValueHolder new. |
|
303 |
]. |
|
304 |
^ listHolder |
|
305 |
! |
|
306 |
||
307 |
listSelection |
|
308 |
"return/create the 'listSelection' value holder (automatically generated)" |
|
309 |
||
310 |
listSelection isNil ifTrue:[ |
|
311 |
listSelection := ValueHolder new. |
|
312 |
listSelection addDependent:self. |
|
313 |
]. |
|
314 |
^ listSelection |
|
315 |
! |
|
316 |
||
317 |
listSelection:something |
|
318 |
"set the 'listSelection' value holder (automatically generated)" |
|
319 |
||
320 |
|oldValue newValue| |
|
321 |
||
322 |
listSelection notNil ifTrue:[ |
|
323 |
oldValue := listSelection value. |
|
324 |
listSelection removeDependent:self. |
|
325 |
]. |
|
326 |
listSelection := something. |
|
327 |
listSelection notNil ifTrue:[ |
|
328 |
listSelection addDependent:self. |
|
329 |
]. |
|
330 |
newValue := listSelection value. |
|
331 |
oldValue ~~ newValue ifTrue:[ |
|
332 |
self update:#value with:newValue from:listSelection. |
|
333 |
]. |
|
334 |
! |
|
335 |
||
336 |
modeHolder |
|
337 |
||
338 |
modeHolder ifNil: |
|
339 |
[modeHolder := ValueHolder with: #display]. |
|
340 |
^modeHolder |
|
341 |
||
342 |
"Modified: / 15-04-2010 / 20:56:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
343 |
! |
|
344 |
||
345 |
modeHolder:aValueModel |
|
346 |
modeHolder := aValueModel. |
|
347 |
! |
|
348 |
||
349 |
selectedLintRules |
|
350 |
^ self selectionHolder |
|
351 |
||
352 |
"Created: / 02-02-2010 / 20:43:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
353 |
! |
|
354 |
||
355 |
selectedLintRules: anObject |
|
356 |
^ self selectionHolder: anObject |
|
357 |
||
358 |
"Created: / 02-02-2010 / 20:43:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
359 |
! ! |
|
360 |
||
361 |
!LintRuleList methodsFor:'change & update'! |
|
362 |
||
363 |
delayedUpdate:something with:aParameter from:changedObject |
|
364 |
"Invoked when an object that I depend upon sends a change notification." |
|
365 |
||
366 |
changedObject == filterHolder ifTrue:[ |
|
367 |
self updateList. |
|
368 |
^ self. |
|
369 |
]. |
|
370 |
||
371 |
(changedObject == listSelection) ifTrue:[ |
|
372 |
listValid ifFalse:[ |
|
373 |
self updateList. |
|
374 |
]. |
|
375 |
^ self selectionChanged |
|
376 |
]. |
|
377 |
||
10499 | 378 |
(changedObject == selectionHolder) ifTrue:[ |
13798 | 379 |
listView notNil ifTrue:[ |
380 |
listView invalidate |
|
381 |
]. |
|
10499 | 382 |
^self. |
383 |
]. |
|
384 |
||
385 |
||
10000 | 386 |
super delayedUpdate:something with:aParameter from:changedObject |
387 |
||
388 |
"Created: / 26-08-2010 / 11:43:33 / Jan Vrany <enter your email here>" |
|
13798 | 389 |
"Modified: / 27-02-2013 / 23:40:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10499 | 390 |
! |
391 |
||
14855 | 392 |
enqueueDelayedUpdateList |
393 |
super enqueueDelayedUpdateList |
|
394 |
! |
|
395 |
||
10499 | 396 |
selectionChanged |
397 |
||
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
|
398 |
| selection | |
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
|
399 |
|
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
|
400 |
super selectionChanged. |
14786
6761e919308a
Bugfix in selection handling.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14755
diff
changeset
|
401 |
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
|
402 |
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
|
403 |
selection isEmptyOrNil ifTrue:[ |
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
|
404 |
self selectionHolder value: selection |
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
|
405 |
] ifFalse:[ |
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
|
406 |
self selectionHolder value: (selection collect:[:entry|entry rule]) |
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
|
407 |
]. |
14855 | 408 |
"/ 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
|
409 |
]. |
10499 | 410 |
|
411 |
"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
|
412 |
"Modified: / 17-10-2014 / 00:01:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 413 |
! ! |
414 |
||
415 |
!LintRuleList methodsFor:'event processing'! |
|
416 |
||
417 |
buttonPress:button x:x y:y view:aView |
|
418 |
||
419 |
| itemIndex item | |
|
420 |
||
421 |
button ~= 1 ifTrue:[^aView buttonPress:button x:x y:y]. |
|
14754
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
422 |
self modeHolder value ~~ #select ifTrue:[^aView buttonPress:button x:x y:y]. |
10000 | 423 |
|
424 |
itemIndex := aView yVisibleToLineNr:y. |
|
14755 | 425 |
itemIndex isNil ifTrue:[^self]. |
10000 | 426 |
itemIndex == 0 ifTrue:[^self]. |
427 |
itemIndex > aView list size ifTrue:[^self]. |
|
428 |
item := aView list at: itemIndex. |
|
429 |
||
430 |
((aView left + x) between: (item x) and: (item x + 16)) |
|
431 |
ifFalse:[^aView buttonPress:button x:x y:y]. |
|
432 |
||
433 |
item checked: item checked not. |
|
434 |
aView invalidate |
|
435 |
||
436 |
"Created: / 08-12-2009 / 14:12:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14755 | 437 |
"Modified: / 13-10-2014 / 18:38:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 438 |
! |
439 |
||
440 |
handlesButtonPress:button inView:aView |
|
14923
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
441 |
^ listView == aView |
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
442 |
and:[ button == 1 |
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
443 |
and:[ self modeHolder value == #select ] ] |
10000 | 444 |
|
445 |
"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
|
446 |
"Modified: / 27-11-2014 / 09:18:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 447 |
! ! |
448 |
||
449 |
!LintRuleList methodsFor:'generators'! |
|
450 |
||
451 |
makeGenerator |
|
452 |
||
453 |
^self modeHolder value == #display |
|
454 |
ifTrue: |
|
455 |
[Iterator on: |
|
456 |
[:whatToDo| |
|
457 |
self listSelection value ? #() do: |
|
458 |
[:each|each failedClasses do:whatToDo]]] |
|
459 |
ifFalse: |
|
460 |
[Iterator on: |
|
461 |
[:whatToDo| |
|
462 |
self selection do:[:rule| whatToDo value: rule]]]. |
|
463 |
||
464 |
"Modified: / 16-04-2010 / 12:13:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
465 |
"Modified: / 25-08-2010 / 13:39:51 / Jan Vrany <enter your email here>" |
|
466 |
! ! |
|
467 |
||
468 |
!LintRuleList methodsFor:'hooks'! |
|
469 |
||
470 |
commonPostOpen |
|
12035 | 471 |
super commonPostOpen. |
10000 | 472 |
self updateOutputGenerator. |
473 |
||
474 |
"Created: / 16-04-2010 / 11:53:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
475 |
! |
|
476 |
||
477 |
postBuildList: aView |
|
478 |
||
479 |
listView := aView scrolledView. |
|
480 |
listView delegate: self. |
|
481 |
||
482 |
"Created: / 08-12-2009 / 14:10:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
483 |
! ! |
|
484 |
||
485 |
!LintRuleList methodsFor:'initialization'! |
|
486 |
||
487 |
initialize |
|
14033
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
488 |
| menu | |
10000 | 489 |
|
490 |
super initialize. |
|
14033
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
491 |
menu := self menuFor: #menu. |
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
492 |
menu isArray ifTrue:[ menu := Menu decodeFromLiteralArray: menu ]. |
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
493 |
menuHolder := ValueHolder with: menu. |
14855 | 494 |
"/ self selection: Set new. |
10000 | 495 |
|
496 |
"Modified: / 25-08-2010 / 15:24:45 / Jan Vrany <enter your email here>" |
|
14033
a8387e4a0a78
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13798
diff
changeset
|
497 |
"Modified: / 24-02-2014 / 12:00:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 498 |
! ! |
499 |
||
500 |
!LintRuleList methodsFor:'menu actions'! |
|
501 |
||
502 |
menuInspect |
|
503 |
||
504 |
| selection | |
|
505 |
selection := self listSelection value. |
|
506 |
selection size = 1 ifTrue:[selection anyOne rule inspect]. |
|
507 |
selection size > 1 ifTrue:[(selection collect:[:e|e rule]) inspect]. |
|
508 |
||
509 |
"Modified: / 25-08-2010 / 14:25:24 / Jan Vrany <enter your email here>" |
|
510 |
! ! |
|
511 |
||
512 |
!LintRuleList methodsFor:'private'! |
|
513 |
||
514 |
listEntryFor: anRBLintRule |
|
515 |
||
516 |
| entry | |
|
517 |
entry := ListEntry new |
|
518 |
rule: anRBLintRule; |
|
519 |
application: self; |
|
520 |
expand; |
|
521 |
yourself. |
|
522 |
^entry |
|
523 |
||
524 |
"Created: / 15-04-2010 / 18:59:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
525 |
"Modified: / 25-08-2010 / 14:15:46 / Jan Vrany <enter your email here>" |
|
526 |
! |
|
527 |
||
528 |
makeDependent |
|
529 |
||
530 |
"nothing to do" |
|
531 |
||
532 |
"Created: / 02-02-2010 / 20:23:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
533 |
! |
|
534 |
||
535 |
makeIndependent |
|
536 |
||
537 |
"nothing to do" |
|
538 |
||
539 |
"Created: / 02-02-2010 / 20:23:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
540 |
! |
|
541 |
||
542 |
rules: rules includes: rule |
|
543 |
||
544 |
^rules contains: |
|
545 |
[:each| |
|
546 |
each class == rule class and: |
|
547 |
[each name = rule name]] |
|
548 |
||
549 |
"Created: / 26-08-2010 / 12:04:04 / Jan Vrany <enter your email here>" |
|
550 |
! |
|
551 |
||
14855 | 552 |
setListValid:aBoolean |
553 |
listValid ifTrue:[ |
|
554 |
aBoolean ifFalse:[self halt]. |
|
555 |
]. |
|
556 |
listValid := aBoolean. |
|
557 |
! |
|
558 |
||
10000 | 559 |
updateList |
560 |
|generator filterS newList| |
|
561 |
||
562 |
generator := self inGeneratorHolder value. |
|
563 |
filterS := self filterHolder value. |
|
10455 | 564 |
filterS notEmptyOrNil ifTrue:[ |
565 |
(filterS startsWith: $*) ifFalse:[filterS := '*' , filterS]. |
|
566 |
(filterS endsWith: $*) ifFalse:[filterS := filterS , '*'] |
|
567 |
]. |
|
568 |
(generator isNil and:[self mode == #display]) ifTrue:[ |
|
569 |
generator := RBCompositeLintRule allRules flattened |
|
570 |
]. |
|
10000 | 571 |
newList := OrderedCollection new. |
572 |
generator do:[:rule | |
|
10455 | 573 |
rule flattened do: [:rule| |
14667 | 574 |
(filterS isEmptyOrNil |
14786
6761e919308a
Bugfix in selection handling.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14755
diff
changeset
|
575 |
or:[(rule name matches: filterS) |
14667 | 576 |
or:[rule class name matches: filterS]]) |
10455 | 577 |
ifTrue:[ |
578 |
newList add: (self listEntryFor:rule) |
|
579 |
] |
|
580 |
] |
|
581 |
]. |
|
11381 | 582 |
newList sort:[:a :b | a name < b name]. |
10000 | 583 |
self listHolder value:newList. |
14855 | 584 |
self setListValid:true. |
10000 | 585 |
|
586 |
"Modified: / 22-07-2009 / 15:58:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
587 |
"Modified: / 25-08-2010 / 13:35:58 / Jan Vrany <enter your email here>" |
|
11381 | 588 |
"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
|
589 |
"Modified: / 16-10-2014 / 23:57:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 590 |
! ! |
591 |
||
10499 | 592 |
!LintRuleList methodsFor:'queries'! |
593 |
||
594 |
supportsSearch |
|
595 |
||
596 |
^false |
|
597 |
||
598 |
"Created: / 04-08-2011 / 23:04:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
599 |
! ! |
|
600 |
||
10000 | 601 |
!LintRuleList methodsFor:'selection'! |
602 |
||
603 |
selectionAdd: rule |
|
604 |
||
605 |
self selection: |
|
606 |
(self selection addAll: rule flattened; yourself) |
|
607 |
||
608 |
"Created: / 25-08-2010 / 13:34:57 / Jan Vrany <enter your email here>" |
|
609 |
! |
|
610 |
||
611 |
selectionIncludes: rule |
|
612 |
||
613 |
^self rules: self selection includes: rule |
|
614 |
||
615 |
"Created: / 25-08-2010 / 13:30:14 / Jan Vrany <enter your email here>" |
|
616 |
"Modified: / 26-08-2010 / 12:04:19 / Jan Vrany <enter your email here>" |
|
617 |
! |
|
618 |
||
619 |
selectionRemove: rule |
|
620 |
||
621 |
| sel rules | |
|
622 |
sel := self selection. |
|
623 |
rules := rule flattened. |
|
624 |
sel := sel reject: |
|
625 |
[:each|self rules: rules includes: each]. |
|
626 |
self selection: sel |
|
627 |
||
628 |
"Created: / 25-08-2010 / 13:35:08 / Jan Vrany <enter your email here>" |
|
629 |
"Modified: / 26-08-2010 / 12:05:06 / Jan Vrany <enter your email here>" |
|
630 |
! ! |
|
631 |
||
632 |
!LintRuleList::ListEntry class methodsFor:'instance creation'! |
|
633 |
||
634 |
change: aChange |
|
635 |
||
636 |
^self new change: aChange |
|
637 |
||
638 |
"Created: / 24-07-2009 / 22:43:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
639 |
! |
|
640 |
||
641 |
change: aChange application: anApplicationModel |
|
642 |
||
643 |
^self new change: aChange; application: anApplicationModel |
|
644 |
||
645 |
"Created: / 05-12-2009 / 14:16:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
646 |
! |
|
647 |
||
648 |
change: aChange parent: aChangeList |
|
649 |
||
650 |
^self new change: aChange; parent: aChangeList |
|
651 |
||
652 |
"Created: / 25-07-2009 / 23:33:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
653 |
! ! |
|
654 |
||
655 |
!LintRuleList::ListEntry methodsFor:'accessing'! |
|
656 |
||
657 |
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
|
658 |
^ application notNil ifTrue:[application] ifFalse:[super application] |
10000 | 659 |
|
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
|
660 |
"Modified: / 28-03-2014 / 10:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 661 |
! |
662 |
||
663 |
application:anApplicationModel |
|
664 |
application := anApplicationModel. |
|
665 |
! |
|
666 |
||
667 |
checked |
|
668 |
||
669 |
^rule isComposite |
|
670 |
ifTrue:[self children anySatisfy:[:each|each checked]] |
|
671 |
ifFalse:[self application selectionIncludes: rule] |
|
672 |
||
673 |
"Modified: / 15-04-2010 / 20:59:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
674 |
"Modified: / 25-08-2010 / 13:29:33 / Jan Vrany <enter your email here>" |
|
675 |
! |
|
676 |
||
677 |
checked:aBoolean |
|
678 |
||
679 |
| app | |
|
680 |
app := self application. |
|
681 |
aBoolean |
|
682 |
ifTrue: [app selectionAdd: rule] |
|
683 |
ifFalse:[app selectionRemove: rule] |
|
684 |
||
685 |
"Modified: / 15-04-2010 / 19:06:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
686 |
"Modified: / 25-08-2010 / 13:35:29 / Jan Vrany <enter your email here>" |
|
687 |
! |
|
688 |
||
689 |
checkedRule |
|
690 |
||
691 |
self checked ifFalse:[^nil]. |
|
692 |
||
693 |
rule isComposite |
|
694 |
ifTrue: |
|
695 |
[^rule copy |
|
696 |
rules: (self children |
|
697 |
collect:[:entry|entry checkedRule] |
|
698 |
thenReject:[:rule|rule isNil]); |
|
699 |
yourself] |
|
700 |
ifFalse: |
|
701 |
[^rule] |
|
702 |
||
703 |
"Created: / 16-04-2010 / 12:06:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
704 |
! |
|
705 |
||
706 |
children |
|
14671 | 707 |
children ifNil:[ |
708 |
rule isComposite ifTrue: [ |
|
709 |
| app | |
|
710 |
||
711 |
app := self application. |
|
712 |
children := rule rules collect:[:eachRule | (app listEntryFor:eachRule) parent:self] |
|
713 |
] ifFalse: [ |
|
714 |
children := #() |
|
715 |
] |
|
716 |
]. |
|
10000 | 717 |
|
718 |
^ children |
|
719 |
||
720 |
"Created: / 25-07-2009 / 23:32:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
721 |
"Modified: / 15-04-2010 / 20:40:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
722 |
! |
|
723 |
||
724 |
failedClasses |
|
725 |
||
726 |
^rule failedClasses |
|
727 |
||
728 |
"Created: / 15-04-2010 / 19:10:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
729 |
! |
|
730 |
||
731 |
failedMethods |
|
732 |
||
733 |
^rule failedMethods |
|
734 |
||
735 |
"Created: / 15-04-2010 / 19:10:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
736 |
! |
|
737 |
||
738 |
failedMethodsInAnyOf: classes meta: meta |
|
739 |
||
740 |
^rule failedMethodsInAnyOf: classes meta: meta |
|
741 |
||
742 |
"Created: / 15-04-2010 / 19:11:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
743 |
! |
|
744 |
||
745 |
label |
|
746 |
||
747 |
^rule displayString. |
|
748 |
||
749 |
"Modified: / 15-04-2010 / 18:44:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
750 |
! |
|
751 |
||
752 |
name |
|
753 |
||
754 |
^rule name |
|
755 |
||
756 |
"Created: / 15-04-2010 / 19:12:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
757 |
! |
|
758 |
||
759 |
rationale |
|
11315 | 760 |
^ rule rationaleWithAnchor |
10000 | 761 |
|
762 |
"Created: / 15-04-2010 / 19:10:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11315 | 763 |
"Modified: / 01-03-2012 / 20:58:50 / cg" |
10000 | 764 |
! |
765 |
||
11317 | 766 |
rationaleWithAnchor |
767 |
^ rule rationaleWithAnchor |
|
768 |
||
769 |
"Created: / 15-04-2010 / 19:10:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
770 |
"Modified: / 01-03-2012 / 20:58:50 / cg" |
|
771 |
"Created: / 02-03-2012 / 01:04:40 / cg" |
|
772 |
! |
|
773 |
||
10000 | 774 |
rule |
775 |
^ rule |
|
776 |
! |
|
777 |
||
778 |
rule:anRBLintRule |
|
779 |
rule := anRBLintRule. |
|
780 |
! |
|
781 |
||
782 |
x |
|
783 |
^ x ? 0 |
|
784 |
||
785 |
"Modified: / 15-04-2010 / 20:48:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
786 |
! ! |
|
787 |
||
788 |
!LintRuleList::ListEntry methodsFor:'displaying'! |
|
789 |
||
790 |
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
|
14754
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
791 |
| cx icon app mode | |
10000 | 792 |
|
793 |
cx := x := newX. |
|
14754
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
794 |
app := self application. |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
795 |
mode := app mode. |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
796 |
mode ~~ #display ifTrue:[ |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
797 |
mode == #select ifTrue:[ |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
798 |
icon := self checked |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
799 |
ifTrue:[app class checkedIcon] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
800 |
ifFalse:[app class uncheckedIcon]. |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
801 |
] ifFalse:[ |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
802 |
icon := self checked |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
803 |
ifTrue:[app class checkedIconDisabled] |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
804 |
ifFalse:[app class uncheckedIconDisabled]. |
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
805 |
]. |
10000 | 806 |
icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2). |
11386 | 807 |
cx := cx + 22."experimental value - this looks good" |
808 |
]. |
|
10000 | 809 |
|
810 |
super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h |
|
811 |
||
11386 | 812 |
"Modified (format): / 07-03-2012 / 20:08:02 / cg" |
14754
7905f58cb037
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14671
diff
changeset
|
813 |
"Modified: / 08-10-2014 / 22:56:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 814 |
! |
815 |
||
13320
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
816 |
displayOn:aGCOrStream |
10000 | 817 |
|
13320
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
818 |
"/ what a kludge - Dolphin and Squeak mean: printOn: a stream; |
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
819 |
"/ ST/X (and some old ST80's) mean: draw-yourself on a GC. |
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
820 |
(aGCOrStream isStream) ifFalse:[ |
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
821 |
^ super displayOn:aGCOrStream |
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
822 |
]. |
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
823 |
|
13798 | 824 |
rule displayOn:aGCOrStream |
10000 | 825 |
|
826 |
"Created: / 15-04-2010 / 19:13:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13798 | 827 |
"Modified: / 29-11-2013 / 12:59:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10000 | 828 |
! ! |
829 |
||
830 |
!LintRuleList class methodsFor:'documentation'! |
|
831 |
||
11300
b9accf9080e4
better rationale (link to class)
Claus Gittinger <cg@exept.de>
parents:
11297
diff
changeset
|
832 |
version |
14923
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
833 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleList.st,v 1.25 2014-11-27 10:39:06 vrany Exp $' |
11300
b9accf9080e4
better rationale (link to class)
Claus Gittinger <cg@exept.de>
parents:
11297
diff
changeset
|
834 |
! |
b9accf9080e4
better rationale (link to class)
Claus Gittinger <cg@exept.de>
parents:
11297
diff
changeset
|
835 |
|
10000 | 836 |
version_CVS |
14923
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
837 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleList.st,v 1.25 2014-11-27 10:39:06 vrany Exp $' |
10000 | 838 |
! |
839 |
||
840 |
version_SVN |
|
14923
7c189a24693c
class: Tools::LintRuleList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14855
diff
changeset
|
841 |
^ '$Id: Tools__LintRuleList.st,v 1.25 2014-11-27 10:39:06 vrany Exp $' |
10000 | 842 |
! ! |
13320
3dd1b4cb9c39
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
12035
diff
changeset
|
843 |