author | Claus Gittinger <cg@exept.de> |
Sat, 20 Oct 2012 21:44:49 +0200 | |
changeset 11880 | 7b506ebc8ef8 |
parent 11860 | 7049aeccbf41 |
child 11900 | 4d1f5bd0a4df |
permissions | -rw-r--r-- |
6179 | 1 |
" |
2 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
5592 | 12 |
"{ Package: 'stx:libtool' }" |
5591 | 13 |
|
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
BrowserList subclass:#ClassCategoryList |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
17 |
instanceVariableNames:'categoryList classes allSelected showPseudoCategories |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
18 |
rawCategoryList cookedCategoryList categoryListView' |
5591 | 19 |
classVariableNames:'AdditionalEmptyCategories' |
20 |
poolDictionaries:'' |
|
21 |
category:'Interface-Browsers-New' |
|
22 |
! |
|
23 |
||
24 |
!ClassCategoryList class methodsFor:'documentation'! |
|
25 |
||
6179 | 26 |
copyright |
27 |
" |
|
28 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
29 |
All Rights Reserved |
|
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
! |
|
39 |
||
5591 | 40 |
documentation |
41 |
" |
|
42 |
embeddable application displaying the class-categories. |
|
43 |
Provides an outputGenerator, which enumerates the classes in |
|
44 |
the selected categories. |
|
45 |
||
46 |
[author:] |
|
47 |
Claus Gittinger (cg@exept.de) |
|
48 |
" |
|
49 |
! ! |
|
50 |
||
51 |
!ClassCategoryList class methodsFor:'interface specs'! |
|
52 |
||
53 |
singleCategoryWindowSpec |
|
54 |
"This resource specification was automatically generated |
|
55 |
by the UIPainter of ST/X." |
|
56 |
||
57 |
"Do not manually edit this!! If it is corrupted, |
|
58 |
the UIPainter may not be able to read the specification." |
|
59 |
||
60 |
" |
|
61 |
UIPainter new openOnClass:ClassCategoryList andSelector:#singleCategoryWindowSpec |
|
62 |
ClassCategoryList new openInterface:#singleCategoryWindowSpec |
|
63 |
" |
|
64 |
||
65 |
<resource: #canvas> |
|
66 |
||
67 |
^ |
|
68 |
#(#FullSpec |
|
5592 | 69 |
#name: #singleCategoryWindowSpec |
70 |
#window: |
|
5591 | 71 |
#(#WindowSpec |
5592 | 72 |
#label: 'ClassCategoryList' |
73 |
#name: 'ClassCategoryList' |
|
74 |
#min: #(#Point 0 0) |
|
75 |
#max: #(#Point 1024 721) |
|
76 |
#bounds: #(#Rectangle 218 175 518 475) |
|
77 |
) |
|
78 |
#component: |
|
5591 | 79 |
#(#SpecCollection |
5592 | 80 |
#collection: #( |
81 |
#(#LabelSpec |
|
82 |
#label: 'ClassCategoryName' |
|
83 |
#name: 'ClassCategoryLabel' |
|
84 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0) |
|
85 |
#translateLabel: true |
|
86 |
#labelChannel: #classCategoryLabelHolder |
|
87 |
#menu: #menuHolder |
|
88 |
) |
|
89 |
) |
|
5591 | 90 |
|
5592 | 91 |
) |
5591 | 92 |
) |
93 |
! |
|
94 |
||
95 |
windowSpec |
|
96 |
"This resource specification was automatically generated |
|
97 |
by the UIPainter of ST/X." |
|
98 |
||
99 |
"Do not manually edit this!! If it is corrupted, |
|
100 |
the UIPainter may not be able to read the specification." |
|
101 |
||
102 |
" |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
103 |
UIPainter new openOnClass:Tools::ClassCategoryList andSelector:#windowSpec |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
104 |
Tools::ClassCategoryList new openInterface:#windowSpec |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
105 |
Tools::ClassCategoryList open |
5591 | 106 |
" |
107 |
||
108 |
<resource: #canvas> |
|
109 |
||
110 |
^ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
111 |
#(FullSpec |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
112 |
name: windowSpec |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
113 |
window: |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
114 |
(WindowSpec |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
115 |
label: 'ClassCategoryList' |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
116 |
name: 'ClassCategoryList' |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
117 |
min: (Point 0 0) |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
118 |
bounds: (Rectangle 0 0 300 300) |
6468 | 119 |
) |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
120 |
component: |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
121 |
(SpecCollection |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
122 |
collection: ( |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
123 |
(SequenceViewSpec |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
124 |
name: 'List' |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
125 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
126 |
tabable: true |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
127 |
model: selectedCategories |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
128 |
menu: menuHolder |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
129 |
hasHorizontalScrollBar: true |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
130 |
hasVerticalScrollBar: true |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
131 |
miniScrollerHorizontal: true |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
132 |
isMultiSelect: true |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
133 |
valueChangeSelector: selectionChangedByClick |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
134 |
useIndex: false |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
135 |
sequenceList: categoryList |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
136 |
doubleClickChannel: doubleClickChannel |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
137 |
properties: |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
138 |
(PropertyListDictionary |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
139 |
canDropSelector: canDropContext: |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
140 |
dragArgument: nil |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
141 |
dropArgument: nil |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
142 |
dropSelector: doDropContext: |
6468 | 143 |
) |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
144 |
postBuildCallback: postBuildCategoryListView: |
6468 | 145 |
) |
146 |
) |
|
5591 | 147 |
|
6468 | 148 |
) |
5591 | 149 |
) |
150 |
! ! |
|
151 |
||
152 |
!ClassCategoryList class methodsFor:'plugIn spec'! |
|
153 |
||
154 |
aspectSelectors |
|
155 |
"This resource specification was automatically generated |
|
156 |
by the UIPainter of ST/X." |
|
157 |
||
158 |
"Do not manually edit this. If it is corrupted, |
|
159 |
the UIPainter may not be able to read the specification." |
|
160 |
||
161 |
"Return a description of exported aspects; |
|
162 |
these can be connected to aspects of an embedding application |
|
163 |
(if this app is embedded in a subCanvas)." |
|
164 |
||
165 |
^ #( |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
166 |
#(doubleClickChannel action) |
8700 | 167 |
#forceGeneratorTrigger |
168 |
#hideUnloadedClasses |
|
169 |
#immediateUpdate |
|
170 |
#inGeneratorHolder |
|
171 |
#menuHolder |
|
172 |
#nameSpaceFilter |
|
173 |
#organizerMode |
|
174 |
#outGeneratorHolder |
|
175 |
#packageFilter |
|
176 |
#selectedCategories |
|
177 |
#selectionChangeCondition |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
178 |
#showCoverageInformation |
8700 | 179 |
#slaveMode |
180 |
#updateTrigger |
|
5591 | 181 |
). |
10351 | 182 |
|
5591 | 183 |
! ! |
184 |
||
8373 | 185 |
!ClassCategoryList class methodsFor:'special'! |
186 |
||
187 |
addAdditionalCategory:aCategory |
|
188 |
"/ those are simulated - in ST/X, empty categories do not |
|
189 |
"/ really exist; however, during browsing, it makes sense. |
|
190 |
||
191 |
AdditionalEmptyCategories isNil ifTrue:[ |
|
192 |
AdditionalEmptyCategories := Set new. |
|
193 |
]. |
|
194 |
AdditionalEmptyCategories add:aCategory. |
|
195 |
Smalltalk changed:#organization with:(nil -> aCategory). "/ not really ... to force update |
|
196 |
! |
|
197 |
||
198 |
removeAdditionalCategories:aListOfCategories |
|
199 |
"/ those are simulated - in ST/X, empty categories do not |
|
200 |
"/ really exist; however, during browsing, it makes sense. |
|
201 |
||
202 |
AdditionalEmptyCategories isNil ifTrue:[^ self]. |
|
203 |
aListOfCategories do:[:eachCategory | |
|
204 |
AdditionalEmptyCategories remove:eachCategory ifAbsent:nil. |
|
205 |
]. |
|
206 |
||
207 |
Smalltalk changed:#organization "/ not really ... to force update |
|
208 |
! |
|
209 |
||
210 |
removeAllAdditionalCategories |
|
211 |
"/ those are simulated - in ST/X, empty categories do not |
|
212 |
"/ really exist; however, during browsing, it makes sense. |
|
213 |
||
214 |
AdditionalEmptyCategories := nil |
|
8446 | 215 |
! |
216 |
||
217 |
renameAdditionalCategories:oldNames to:newName |
|
218 |
"/ those are simulated - in ST/X, empty categories do not |
|
219 |
"/ really exist; however, during browsing, it makes sense. |
|
220 |
||
221 |
self removeAdditionalCategories:oldNames. |
|
222 |
self addAdditionalCategory:newName. |
|
8373 | 223 |
! ! |
224 |
||
5591 | 225 |
!ClassCategoryList methodsFor:'aspects'! |
226 |
||
227 |
categoryList |
|
228 |
categoryList isNil ifTrue:[ |
|
229 |
categoryList := ValueHolder new. |
|
230 |
]. |
|
231 |
^ categoryList |
|
232 |
||
233 |
"Created: / 25.2.2000 / 02:23:08 / cg" |
|
234 |
! |
|
235 |
||
236 |
categoryList:aValueHolder |
|
237 |
categoryList notNil ifTrue:[ |
|
238 |
categoryList removeDependent:self |
|
239 |
]. |
|
240 |
categoryList := aValueHolder. |
|
241 |
categoryList notNil ifTrue:[ |
|
242 |
categoryList addDependent:self |
|
243 |
]. |
|
244 |
||
245 |
"Created: / 18.8.2000 / 15:21:42 / cg" |
|
246 |
! |
|
247 |
||
248 |
classCategoryLabelHolder |
|
249 |
^ self pseudoListLabelHolder |
|
250 |
! |
|
251 |
||
252 |
selectedCategories |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
253 |
^ self selectionHolder |
5591 | 254 |
! |
255 |
||
256 |
selectedCategories:aValueHolder |
|
257 |
^ self selectionHolder:aValueHolder |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
258 |
! |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
259 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
260 |
selectionHolder |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
261 |
"/ self halt. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
262 |
^ super selectionHolder |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
263 |
! |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
264 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
265 |
selectionHolder:aValueHolder |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
266 |
"/ self halt. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
267 |
super selectionHolder:aValueHolder |
5591 | 268 |
! ! |
269 |
||
270 |
!ClassCategoryList methodsFor:'change & update'! |
|
271 |
||
272 |
delayedUpdate:something with:aParameter from:changedObject |
|
6702 | 273 |
|selectedCategories allSelectedBefore |
5591 | 274 |
nameListEntryForALL categoryOfClass wg| |
275 |
||
276 |
selectedCategories := self selectedCategoriesStrings. |
|
277 |
||
278 |
changedObject == Smalltalk ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
279 |
((something == #classVariables) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
280 |
or:[something == #classDefinition]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
281 |
listValid == true ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
282 |
categoryOfClass := aParameter category. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
283 |
(rawCategoryList includes:categoryOfClass) ifFalse:[ |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
284 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
285 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
286 |
slaveMode value ~~ true ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
287 |
(selectedCategories includes:categoryOfClass) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
288 |
"/ a selected class has changed |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
289 |
"/ in order to give others a chance to update their list before, |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
290 |
"/ this one is always enqueued for delayed update (even if immediateUpdate is true) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
291 |
"/ self enqueueDelayedUpdateOutputGenerator |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
292 |
self enqueueMessage:#updateOutputGenerator for:self arguments:#() |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
293 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
294 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
295 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
296 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
297 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
298 |
something == #newClass ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
299 |
categoryOfClass := aParameter category. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
300 |
listValid == false ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
301 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
302 |
]. |
5591 | 303 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
304 |
(rawCategoryList includes:categoryOfClass) ifFalse:[ |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
305 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
306 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
307 |
|
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
308 |
slaveMode value ~~ true ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
309 |
(selectedCategories includes:categoryOfClass) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
310 |
self enqueueDelayedUpdateOutputGenerator |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
311 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
312 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
313 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
314 |
]. |
5591 | 315 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
316 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
317 |
|
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
318 |
(something == #classRemove |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
319 |
or:[something == #projectOrganization |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
320 |
or:[something == #organization]]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
321 |
slaveMode value ~~ true ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
322 |
"/ sorry: cannot filter on category (already changed to #removed) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
323 |
self enqueueDelayedUpdateOutputGenerator |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
324 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
325 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
326 |
^ self |
5591 | 327 |
]. |
328 |
||
329 |
changedObject == ChangeSet ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
330 |
"/ remove all other change notifications from the eventQueue |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
331 |
wg := self windowGroup. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
332 |
wg isNil ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
333 |
"/ oops - should no longer be dependent... |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
334 |
changedObject removeDependent:self. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
335 |
] ifFalse:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
336 |
wg sensor |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
337 |
flushEventsFor:self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
338 |
where:[:ev | ev isMessageSendEvent |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
339 |
and:[ev selector == #delayedUpdate:with:from: |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
340 |
and:[(ev arguments at:3) == ChangeSet]]]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
341 |
]. |
5591 | 342 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
343 |
something == #addChange: ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
344 |
"/ only need to invalidate, if that change changes my emphasis |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
345 |
"/ (i.e. if its a new methodChange) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
346 |
self window topView shown ifFalse:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
347 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
348 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
349 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
350 |
|
5591 | 351 |
"/ self invalidateList. |
352 |
||
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
353 |
aParameter isMethodChange ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
354 |
aParameter changeClass notNil ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
355 |
(ChangeSet current |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
356 |
count:[:chg | chg notNil and:[chg isMethodChange |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
357 |
and:[ chg className = aParameter className ]]]) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
358 |
== 1 ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
359 |
"/ that methodChange is the first for this method. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
360 |
self colorizeCategoryAsChanged:(aParameter changeClass category). |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
361 |
] |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
362 |
] |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
363 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
364 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
365 |
]. |
5591 | 366 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
367 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
368 |
^ self |
5591 | 369 |
]. |
370 |
||
371 |
changedObject == nameSpaceFilter ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
372 |
"/ all might be more or less than before ... |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
373 |
allSelected := false. |
5591 | 374 |
]. |
375 |
changedObject == packageFilter ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
376 |
"/ all might be more or less than before ... |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
377 |
allSelected := false. |
5591 | 378 |
]. |
379 |
||
6702 | 380 |
changedObject == self selectedCategories ifTrue:[ |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
381 |
categoryList isNil ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
382 |
"/ oops - hurry up |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
383 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
384 |
]. |
5591 | 385 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
386 |
nameListEntryForALL := self class nameListEntryForALL. |
5591 | 387 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
388 |
selectedCategories size > 1 ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
389 |
(selectedCategories includes:nameListEntryForALL) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
390 |
self makeSelectionOtherThanAllVisible. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
391 |
] |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
392 |
]. |
5591 | 393 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
394 |
"/ if all selected before AND allSelected after, no need to update the output generator |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
395 |
allSelectedBefore := allSelected ? false. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
396 |
allSelected := selectedCategories includes:nameListEntryForALL. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
397 |
(allSelectedBefore and:[allSelected]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
398 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
399 |
]. |
5591 | 400 |
]. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
401 |
changedObject == categoryList ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
402 |
"/ hack; we use the raw list, but SelectionInListView shall show cookedList (sigh) |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
403 |
self halt. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
404 |
]. |
5591 | 405 |
super delayedUpdate:something with:aParameter from:changedObject |
406 |
||
407 |
"Created: / 5.2.2000 / 13:42:12 / cg" |
|
408 |
"Modified: / 12.11.2001 / 19:36:16 / cg" |
|
409 |
! |
|
410 |
||
411 |
forceUpdateList |
|
412 |
self categoryList setValue:#(). |
|
413 |
self updateList. |
|
414 |
self categoryList changed. |
|
415 |
! |
|
416 |
||
417 |
selectionChangedByClick |
|
418 |
"we are not interested in that - get another notification |
|
419 |
via the changed valueHolder" |
|
420 |
||
421 |
"Created: / 11.2.2000 / 11:39:48 / cg" |
|
422 |
! |
|
423 |
||
424 |
update:something with:aParameter from:changedObject |
|
425 |
|categoryOfClass| |
|
426 |
||
427 |
changedObject == Smalltalk ifTrue:[ |
|
8751 | 428 |
(something == #methodInClass |
429 |
or:[ something == #classComment |
|
430 |
or:[ something == #methodDictionary |
|
431 |
or:[ something == #methodTrap |
|
10365 | 432 |
or:[ something == #methodCoverageInfo |
433 |
or:[ something == #methodInClassRemoved ]]]]]) ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
434 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
435 |
]. |
8751 | 436 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
437 |
(something == #classVariables |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
438 |
or:[something == #classDefinition]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
439 |
categoryOfClass := aParameter category. |
6702 | 440 |
(self selectedCategoriesStrings includes:categoryOfClass) ifTrue:[ |
5591 | 441 |
"/ self halt. |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
442 |
self updateOutputGenerator. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
443 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
444 |
]. |
5591 | 445 |
]. |
446 |
||
447 |
"/ changedObject == ChangeSet ifTrue:[ |
|
448 |
"/ something == #addChange: ifTrue:[ |
|
449 |
"/ ^ self |
|
450 |
"/ ] |
|
451 |
"/ ]. |
|
452 |
||
453 |
super update:something with:aParameter from:changedObject |
|
454 |
||
10365 | 455 |
"Modified: / 20-07-2011 / 18:50:04 / cg" |
5591 | 456 |
! ! |
457 |
||
458 |
!ClassCategoryList methodsFor:'drag & drop'! |
|
459 |
||
6468 | 460 |
canDropContext:aDropContext |
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
461 |
|cat objects droppedClasses| |
5591 | 462 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
463 |
objects := aDropContext dropObjects collect:[:obj | obj theObject]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
464 |
(self objectsAreClassFiles:objects) ifTrue:[^ true]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
465 |
|
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
466 |
(objects conform:[:aClass | aClass isClass]) ifFalse:[^ false]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
467 |
droppedClasses := objects. |
6468 | 468 |
(droppedClasses contains:[:aClass | aClass isPrivate not]) ifFalse:[^ false]. |
5591 | 469 |
|
470 |
cat := self categoryAtTargetPointOf:aDropContext. |
|
6492 | 471 |
cat isNil ifTrue:[ ^ false ]. |
472 |
cat = '* obsolete *' ifTrue:[ ^ false ]. |
|
5591 | 473 |
|
6468 | 474 |
(droppedClasses contains:[:aClass | aClass category ~= cat]) ifFalse:[^ false]. |
5591 | 475 |
^ true. |
7119 | 476 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
477 |
"Modified: / 17-10-2006 / 18:28:04 / cg" |
5591 | 478 |
! |
479 |
||
480 |
categoryAtTargetPointOf:aDropContext |
|
481 |
|p categoryListView lineNr cat| |
|
482 |
||
483 |
p := aDropContext targetPoint. |
|
484 |
||
485 |
categoryListView := aDropContext targetWidget. |
|
486 |
||
487 |
lineNr := categoryListView lineAtY:p y. |
|
488 |
lineNr isNil ifTrue:[^ nil]. |
|
489 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
490 |
cat := rawCategoryList at:lineNr. |
5591 | 491 |
cat := cat string. |
492 |
cat = self class nameListEntryForALL ifTrue:[^ nil]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
493 |
|
6702 | 494 |
(cat endsWith:(self stringForExtensions)) ifTrue:[ |
495 |
cat := cat copyWithoutLast:(self stringForExtensions size) |
|
496 |
]. |
|
5591 | 497 |
^ cat |
498 |
! |
|
499 |
||
6468 | 500 |
doDropContext:aDropContext |
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
501 |
|cat objects| |
5591 | 502 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
503 |
objects := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
504 |
(objects conform:[:something | something isClass]) ifTrue:[ |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
505 |
cat := self categoryAtTargetPointOf:aDropContext. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
506 |
cat notNil ifTrue:[ |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
507 |
self masterApplication moveClasses:objects toCategory:cat. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
508 |
]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
509 |
^ self |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
510 |
]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
511 |
(objects conform:[:something | something isFilename]) ifTrue:[ |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
512 |
self dropClassFiles:objects. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
513 |
^ self |
5591 | 514 |
]. |
7119 | 515 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
516 |
"Modified: / 17-10-2006 / 18:29:25 / cg" |
5591 | 517 |
! ! |
518 |
||
519 |
!ClassCategoryList methodsFor:'generators'! |
|
520 |
||
521 |
makeGenerator |
|
522 |
"return a generator which enumerates the classes from the selected category." |
|
523 |
||
8751 | 524 |
|cats hideUnloadedClasses allName nameSpaceFilter packageFilter |
525 |
showChangedClasses showUnloaded showUndocumented inclusionTest changedClasses| |
|
5591 | 526 |
|
6702 | 527 |
cats := self selectedCategoriesStrings. |
5591 | 528 |
cats size == 0 ifTrue:[ |
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
529 |
^ #() |
5591 | 530 |
]. |
531 |
||
532 |
allName := self class nameListEntryForALL. |
|
533 |
||
8345
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
534 |
(cats includes:allName) ifTrue:[ |
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
535 |
inGeneratorHolder value isOrderedCollection ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
536 |
cats := rawCategoryList copyWithout:allName. |
8345
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
537 |
] |
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
538 |
]. |
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
539 |
|
8734 | 540 |
showChangedClasses := cats includes:(self class nameListEntryForChanged). |
8751 | 541 |
showUnloaded := cats includes:(self class nameListEntryForUnloaded). |
542 |
showUndocumented := cats includes:(self class nameListEntryForUndocumented). |
|
8734 | 543 |
|
5591 | 544 |
hideUnloadedClasses := self hideUnloadedClasses value ? false. |
545 |
nameSpaceFilter := self nameSpaceFilter value. |
|
546 |
nameSpaceFilter notNil ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
547 |
(nameSpaceFilter includes:allName) ifTrue:[nameSpaceFilter := nil]. |
5591 | 548 |
]. |
549 |
packageFilter := self packageFilter value. |
|
550 |
packageFilter notNil ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
551 |
(packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
5591 | 552 |
]. |
553 |
||
554 |
(cats includes:allName) ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
555 |
hideUnloadedClasses ifTrue:[ |
8751 | 556 |
inclusionTest := [:cls | cls isLoaded]. |
557 |
] ifFalse:[ |
|
558 |
inclusionTest := [:cls | true]. |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
559 |
]. |
8751 | 560 |
] ifFalse:[ |
561 |
inclusionTest := |
|
562 |
[:cls | |
|
563 |
|cat isLoaded included| |
|
564 |
||
565 |
isLoaded := cls isLoaded. |
|
566 |
included := isLoaded not and:[ showUnloaded ]. |
|
567 |
included ifFalse:[ |
|
568 |
(hideUnloadedClasses not or:[isLoaded]) ifTrue:[ |
|
569 |
cat := cls category ? '* no category *'. |
|
570 |
included := cats includes:cat. |
|
571 |
included ifFalse:[ |
|
572 |
included := showChangedClasses |
|
573 |
and:[ (changedClasses includes:cls theNonMetaclass) |
|
574 |
or:[(changedClasses includes:cls theMetaclass)] ]. |
|
575 |
included ifFalse:[ |
|
11880 | 576 |
included := showUndocumented |
577 |
and:[ isLoaded |
|
578 |
and:[ cls isPrivate not |
|
579 |
and:[ (cls theMetaclass includesSelector:#documentation) not ]]]. |
|
8751 | 580 |
]. |
581 |
]. |
|
582 |
]. |
|
583 |
]. |
|
584 |
included |
|
585 |
]. |
|
5591 | 586 |
]. |
587 |
||
8748 | 588 |
^ Iterator on:[:whatToDo | |
8751 | 589 |
showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ]. |
8734 | 590 |
|
8751 | 591 |
Smalltalk allClassesDo:[:cls | |
592 |
(cls isRealNameSpace) ifFalse:[ |
|
593 |
(inclusionTest value:cls) ifTrue:[ |
|
594 |
(nameSpaceFilter isNil |
|
595 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
|
596 |
(packageFilter isNil |
|
597 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
|
598 |
whatToDo value:cls |
|
599 |
] |
|
600 |
] |
|
601 |
]. |
|
602 |
]. |
|
603 |
]. |
|
604 |
]. |
|
5591 | 605 |
|
7504 | 606 |
"Created: / 05-02-2000 / 13:42:12 / cg" |
607 |
"Modified: / 10-11-2006 / 17:13:26 / cg" |
|
5591 | 608 |
! ! |
609 |
||
610 |
!ClassCategoryList methodsFor:'private'! |
|
611 |
||
612 |
colorizeCategoryAsChanged:category |
|
613 |
|colorizedCategoryItem categoryList idx| |
|
614 |
||
615 |
colorizedCategoryItem := self colorizeForChangedCode:category copy asText. |
|
616 |
||
617 |
categoryList := self categoryList value. |
|
618 |
idx := categoryList indexOf:category. |
|
619 |
idx ~~ 0 ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
620 |
((categoryList at:idx) sameStringAndEmphasisAs:colorizedCategoryItem) ifFalse:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
621 |
categoryList at:idx put:colorizedCategoryItem. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
622 |
self categoryList changed. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
623 |
] |
5591 | 624 |
]. |
625 |
! |
|
626 |
||
627 |
listOfCategories |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
628 |
|categories categoriesBag hideUnloadedClasses generator nameSpaceFilter packageFilter allName |
7504 | 629 |
categoriesWithExtensions categoriesWithChangedCode categoriesWithRemoteChangedCode |
9127 | 630 |
classesInChangeSet classesInRemoteChangeSet |
631 |
numClassesInChangeSet numClasses numUnloaded numUndocumented pseudoEntryColor| |
|
5591 | 632 |
|
633 |
allName := self class nameListEntryForALL. |
|
634 |
||
635 |
hideUnloadedClasses := self hideUnloadedClasses value. |
|
636 |
nameSpaceFilter := self nameSpaceFilter value. |
|
637 |
nameSpaceFilter notNil ifTrue:[ |
|
5950 | 638 |
(nameSpaceFilter includes:allName) ifTrue:[nameSpaceFilter := nil]. |
5591 | 639 |
]. |
640 |
packageFilter := self packageFilter value. |
|
641 |
packageFilter notNil ifTrue:[ |
|
5950 | 642 |
(packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
5591 | 643 |
]. |
644 |
||
8751 | 645 |
numClasses := numUndocumented := numUnloaded := numClassesInChangeSet := 0. |
8734 | 646 |
|
5591 | 647 |
categories := Set new. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
648 |
categoriesBag := Bag new. |
5591 | 649 |
categoriesWithExtensions := Set new. |
650 |
categoriesWithChangedCode := Set new. |
|
7504 | 651 |
categoriesWithRemoteChangedCode := Set new. |
5591 | 652 |
|
6978 | 653 |
classesInChangeSet := ChangeSet current changedClasses. |
654 |
classesInChangeSet := classesInChangeSet collect:[:eachClass | eachClass theNonMetaclass]. |
|
5591 | 655 |
|
7504 | 656 |
classesInRemoteChangeSet := SmallTeam isNil ifTrue:[#()] ifFalse:[ SmallTeam changedClasses ]. |
657 |
classesInRemoteChangeSet := classesInRemoteChangeSet collect:[:each | each theNonMetaclass]. |
|
658 |
||
5591 | 659 |
classes := IdentitySet new. |
660 |
inGeneratorHolder isNil ifTrue:[ |
|
5950 | 661 |
Smalltalk allClassesDo:[:cls | |
8751 | 662 |
|cat isLoaded| |
663 |
||
664 |
(cls isRealNameSpace) ifFalse:[ |
|
665 |
(nameSpaceFilter isNil |
|
666 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
|
667 |
(packageFilter isNil |
|
668 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
|
5591 | 669 |
|
8751 | 670 |
isLoaded := cls isLoaded. |
671 |
isLoaded ifTrue:[ |
|
11880 | 672 |
numUnloaded := numUnloaded + 1. |
673 |
cls isPrivate ifFalse:[ |
|
674 |
(cls theMetaclass includesSelector:#documentation) ifFalse:[ |
|
675 |
numUndocumented := numUndocumented + 1. |
|
676 |
]. |
|
8751 | 677 |
]. |
678 |
]. |
|
679 |
||
680 |
(hideUnloadedClasses not or:[isLoaded]) |
|
681 |
ifTrue:[ |
|
8734 | 682 |
numClasses := numClasses + 1. |
683 |
||
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
684 |
cat := cls category ? '* no category *'. |
5950 | 685 |
cat isString ifFalse:[self halt:'oops - strange category']. |
686 |
categories add:cat. |
|
687 |
classes add:cls. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
688 |
categoriesBag add:cat. |
5591 | 689 |
|
6978 | 690 |
(classesInChangeSet includes:cls theNonMetaclass) ifTrue:[ |
5950 | 691 |
categoriesWithChangedCode add:cat |
7504 | 692 |
]. |
693 |
(classesInRemoteChangeSet includes:cls theNonMetaclass) ifTrue:[ |
|
694 |
categoriesWithRemoteChangedCode add:cat |
|
695 |
]. |
|
696 |
cls hasExtensions ifTrue:[ |
|
697 |
categoriesWithExtensions add:cat |
|
5950 | 698 |
]. |
699 |
] |
|
700 |
] |
|
701 |
] |
|
702 |
] |
|
703 |
]. |
|
5591 | 704 |
|
5950 | 705 |
"/ those are simulated - in ST/X, empty categories do not |
706 |
"/ really exist; however, during browsing, it makes sense. |
|
707 |
AdditionalEmptyCategories size > 0 ifTrue:[ |
|
708 |
"/ remove those that are present ... |
|
709 |
AdditionalEmptyCategories := AdditionalEmptyCategories select:[:cat | (categories includes:cat) not]. |
|
710 |
categories addAll:AdditionalEmptyCategories. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
711 |
categoriesBag addAll:AdditionalEmptyCategories withOccurrences:0. |
5950 | 712 |
]. |
5591 | 713 |
] ifFalse:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
714 |
|setOfCategories| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
715 |
|
5950 | 716 |
generator := inGeneratorHolder value. |
717 |
generator isNil ifTrue:[^ #() ]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
718 |
setOfCategories := Set withAll:generator. |
8345
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
719 |
generator do:[:cat | categories add:cat string]. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
720 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
721 |
Smalltalk allClassesDo:[:each | |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
722 |
|cat| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
723 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
724 |
cat := each category string asSymbol. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
725 |
(setOfCategories includes:cat) ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
726 |
categoriesBag add:cat. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
727 |
]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
728 |
]. |
5591 | 729 |
]. |
730 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
731 |
pseudoEntryColor := self class pseudoEntryForegroundColor. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
732 |
|
5591 | 733 |
categories := categories asOrderedCollection. |
734 |
||
735 |
categories sort. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
736 |
rawCategoryList := categories. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
737 |
|
5950 | 738 |
categories := |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
739 |
categories collect:[:cat | |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
740 |
|item| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
741 |
|
5950 | 742 |
(categoriesWithChangedCode includes:cat) ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
743 |
item := self colorizeForChangedCode:cat copy asText |
5950 | 744 |
] ifFalse:[ |
745 |
(categoriesWithExtensions includes:cat) ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
746 |
item := self colorizeForDifferentPackage:cat copy asText |
5950 | 747 |
"/ cannot add a + here - need separate list for presentation and filter |
6702 | 748 |
"/ cat , (self colorizeForDifferentPackage:self stringForExtensions) |
5950 | 749 |
] ifFalse:[ |
7504 | 750 |
(categoriesWithRemoteChangedCode includes:cat) ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
751 |
item := self colorizeForChangedCodeInSmallTeam:cat copy asText |
7504 | 752 |
] ifFalse:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
753 |
item := cat |
7504 | 754 |
] |
5950 | 755 |
] |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
756 |
]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
757 |
item := item , ((' (%1)' bindWith:(categoriesBag occurrencesOf:cat)) |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
758 |
colorizeAllWith:pseudoEntryColor). |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
759 |
item |
5950 | 760 |
]. |
8734 | 761 |
|
8751 | 762 |
numUnloaded > 0 ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
763 |
rawCategoryList addFirst:self class nameListEntryForUnloaded. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
764 |
categories addFirst:((self class nameListEntryForUnloadedWithCount bindWith:numUnloaded) allItalic colorizeAllWith:pseudoEntryColor). |
8751 | 765 |
]. |
766 |
numUndocumented > 0 ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
767 |
rawCategoryList addFirst:self class nameListEntryForUndocumented. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
768 |
categories addFirst:((self class nameListEntryForUndocumentedWithCount bindWith:numUndocumented) allItalic colorizeAllWith:pseudoEntryColor). |
8751 | 769 |
]. |
8734 | 770 |
numClassesInChangeSet := ChangeSet current changedClasses size. |
771 |
numClassesInChangeSet > 0 ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
772 |
rawCategoryList addFirst:self class nameListEntryForChanged. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
773 |
categories addFirst:((self class nameListEntryForChangedWithCount bindWith:numClassesInChangeSet) allItalic colorizeAllWith:pseudoEntryColor). |
5591 | 774 |
]. |
8734 | 775 |
|
776 |
categories size > 0 ifTrue:[ |
|
777 |
categories size == 1 ifTrue:[ |
|
778 |
self classCategoryLabelHolder value:(categories first) |
|
779 |
]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
780 |
rawCategoryList addFirst:self class nameListEntryForALL. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
781 |
categories addFirst:((self class nameListEntryForALLWithCount bindWith:numClasses) allItalic colorizeAllWith:pseudoEntryColor). |
5591 | 782 |
]. |
8734 | 783 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
784 |
cookedCategoryList := categories. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
785 |
^ rawCategoryList. |
5591 | 786 |
|
6950 | 787 |
"Created: / 05-02-2000 / 13:42:12 / cg" |
7504 | 788 |
"Modified: / 10-11-2006 / 17:43:19 / cg" |
5591 | 789 |
! |
790 |
||
791 |
listView |
|
8741 | 792 |
^ self componentAt:#List |
5591 | 793 |
! |
794 |
||
795 |
makeDependent |
|
796 |
Smalltalk addDependent:self. |
|
797 |
ChangeSet addDependent:self. |
|
798 |
||
799 |
"Created: / 5.2.2000 / 13:42:13 / cg" |
|
800 |
! |
|
801 |
||
802 |
makeIndependent |
|
803 |
Smalltalk removeDependent:self. |
|
804 |
ChangeSet removeDependent:self. |
|
805 |
||
806 |
"Created: / 5.2.2000 / 13:42:13 / cg" |
|
807 |
! |
|
808 |
||
809 |
makeItemVisible:item |
|
810 |
|idx listView| |
|
811 |
||
812 |
idx := categoryList value indexOf:item. |
|
813 |
idx ~~ 0 ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
814 |
(listView := self listView) notNil ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
815 |
listView makeLineVisible:idx. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
816 |
] |
5591 | 817 |
] |
818 |
! |
|
819 |
||
820 |
makeSelectionOtherThanAllVisible |
|
821 |
|selectedCategories item| |
|
822 |
||
823 |
selectedCategories := self selectedCategoriesStrings. |
|
824 |
"/ the first item after the *all* item |
|
825 |
item := (selectedCategories copy remove:self class nameListEntryForALL; yourself) first. |
|
826 |
self makeItemVisible:item. |
|
827 |
! |
|
828 |
||
829 |
release |
|
830 |
super release. |
|
831 |
||
832 |
categoryList removeDependent:self. |
|
833 |
! |
|
834 |
||
835 |
selectedCategoriesStrings |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
836 |
|selectedCategories stringForExtensions| |
6950 | 837 |
|
838 |
stringForExtensions := self stringForExtensions. |
|
5591 | 839 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
840 |
selectedCategories := self selectedCategories value ? #(). |
6950 | 841 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
842 |
"/ selectedCategories := selectedCategories |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
843 |
"/ collect:[:each | |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
844 |
"/ |s| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
845 |
"/ s := each string. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
846 |
"/ (s endsWith:stringForExtensions) ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
847 |
"/ s := s copyWithoutLast:(stringForExtensions size). |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
848 |
"/ ]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
849 |
"/ s |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
850 |
"/ ]. |
5591 | 851 |
^ selectedCategories |
6950 | 852 |
|
853 |
"Modified: / 23-08-2006 / 11:38:26 / cg" |
|
5591 | 854 |
! |
855 |
||
6702 | 856 |
stringForExtensions |
857 |
^ ' [ + ]' |
|
858 |
! |
|
859 |
||
5591 | 860 |
updateList |
861 |
|oldList newList oldSelection newSelection prevClasses |
|
862 |
selectedCategoriesHolder| |
|
863 |
||
864 |
selectedCategoriesHolder := self selectedCategories. |
|
865 |
oldSelection := selectedCategoriesHolder value ? #(). |
|
866 |
prevClasses := classes copy. |
|
867 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
868 |
newList := self listOfCategories. "/ sigh - sideeffect of setting rawList |
5591 | 869 |
oldList := (self categoryList value) ? #(). |
870 |
(newList sameContentsAs:oldList whenComparedWith:[:a :b | a sameStringAndEmphasisAs: b]) |
|
871 |
ifFalse:[ |
|
10580 | 872 |
"/ a real change, or only emphasis ? |
873 |
(newList sameContentsAs:oldList whenComparedWith:[:a :b | a asString string = b asString string]) ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
874 |
"/ only emphasis |
10580 | 875 |
oldSelection size > 0 ifTrue:[ |
876 |
selectedCategoriesHolder removeDependent:self. |
|
877 |
selectedCategoriesHolder value:#(). |
|
878 |
selectedCategoriesHolder addDependent:self. |
|
879 |
]. |
|
880 |
categoryList value:newList. |
|
5591 | 881 |
|
10580 | 882 |
oldSelection size > 0 ifTrue:[ |
883 |
newSelection := oldSelection select:[:cat | newList includes:cat]. |
|
884 |
selectedCategoriesHolder value:newSelection. |
|
885 |
] |
|
886 |
] ifFalse:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
887 |
"/ a real change |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
888 |
|
10580 | 889 |
categoryList value:newList. |
890 |
||
891 |
"/ in case the same categories are present, but classes have changed ... |
|
892 |
(prevClasses isNil or:[(classes identicalContentsAs:prevClasses) not]) ifTrue:[ |
|
893 |
self updateOutputGenerator. |
|
894 |
] |
|
895 |
] |
|
5591 | 896 |
] ifTrue:[ |
10580 | 897 |
"/ in case the same categories are present, but classes have changed ... |
898 |
(prevClasses isNil or:[(classes identicalContentsAs:prevClasses) not]) ifTrue:[ |
|
899 |
self updateOutputGenerator. |
|
900 |
] |
|
5591 | 901 |
]. |
902 |
listValid := true. |
|
903 |
||
10580 | 904 |
"Created: / 05-02-2000 / 13:42:13 / cg" |
905 |
"Modified: / 17-08-2011 / 09:52:13 / cg" |
|
5591 | 906 |
! ! |
907 |
||
908 |
!ClassCategoryList methodsFor:'setup'! |
|
909 |
||
5909 | 910 |
commonPostBuild |
5591 | 911 |
|listView| |
912 |
||
913 |
listView := self listView. |
|
914 |
listView notNil ifTrue:[ |
|
5909 | 915 |
listView scrollWhenUpdating:nil |
5591 | 916 |
]. |
5909 | 917 |
super commonPostBuild |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
918 |
! |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
919 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
920 |
postBuildCategoryListView:aView |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
921 |
categoryListView := aView. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
922 |
categoryListView visualBlock:[:view :lineNr | cookedCategoryList at:lineNr]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
923 |
categoryListView selectedVisualBlock:[:view :lineNr | (cookedCategoryList at:lineNr) string] |
5591 | 924 |
! ! |
925 |
||
926 |
!ClassCategoryList methodsFor:'special'! |
|
927 |
||
928 |
addAdditionalCategory:aCategory |
|
929 |
"/ those are simulated - in ST/X, empty categories do not |
|
930 |
"/ really exist; however, during browsing, it makes sense. |
|
931 |
||
8373 | 932 |
self class addAdditionalCategory:aCategory |
5591 | 933 |
! |
934 |
||
935 |
removeAdditionalCategories:aListOfCategories |
|
8373 | 936 |
self class removeAdditionalCategories:aListOfCategories |
5591 | 937 |
! |
938 |
||
939 |
removeAllAdditionalCategories |
|
8373 | 940 |
self class removeAllAdditionalCategories |
8446 | 941 |
! |
942 |
||
943 |
renameAdditionalCategories:oldNames to:newName |
|
944 |
"/ those are simulated - in ST/X, empty categories do not |
|
945 |
"/ really exist; however, during browsing, it makes sense. |
|
946 |
||
947 |
self class renameAdditionalCategories:oldNames to:newName |
|
5591 | 948 |
! ! |
949 |
||
950 |
!ClassCategoryList class methodsFor:'documentation'! |
|
951 |
||
952 |
version |
|
11880 | 953 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.34 2012-10-20 19:44:49 cg Exp $' |
9005 | 954 |
! |
955 |
||
956 |
version_CVS |
|
11880 | 957 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.34 2012-10-20 19:44:49 cg Exp $' |
5591 | 958 |
! ! |