author | Claus Gittinger <cg@exept.de> |
Wed, 13 Mar 2013 23:36:14 +0100 | |
changeset 12465 | aed594275d40 |
parent 12043 | 9419417e0b19 |
child 12487 | f36cda6765a9 |
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. |
11917
4abec96d769d
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11907
diff
changeset
|
374 |
"/ self invalidateList - done in super |
5591 | 375 |
]. |
376 |
changedObject == packageFilter ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
377 |
"/ all might be more or less than before ... |
11917
4abec96d769d
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11907
diff
changeset
|
378 |
allSelected := false. |
4abec96d769d
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11907
diff
changeset
|
379 |
"/ self invalidateList - done in super |
5591 | 380 |
]. |
381 |
||
6702 | 382 |
changedObject == self selectedCategories ifTrue:[ |
11917
4abec96d769d
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11907
diff
changeset
|
383 |
listValid ifFalse:[ |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
384 |
"/ oops - hurry up |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
385 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
386 |
]. |
5591 | 387 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
388 |
nameListEntryForALL := self class nameListEntryForALL. |
5591 | 389 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
390 |
selectedCategories size > 1 ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
391 |
(selectedCategories includes:nameListEntryForALL) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
392 |
self makeSelectionOtherThanAllVisible. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
393 |
] |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
394 |
]. |
5591 | 395 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
396 |
"/ 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
|
397 |
allSelectedBefore := allSelected ? false. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
398 |
allSelected := selectedCategories includes:nameListEntryForALL. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
399 |
(allSelectedBefore and:[allSelected]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
400 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
401 |
]. |
5591 | 402 |
]. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
403 |
changedObject == categoryList ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
404 |
self halt. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
405 |
]. |
5591 | 406 |
super delayedUpdate:something with:aParameter from:changedObject |
407 |
||
408 |
"Created: / 5.2.2000 / 13:42:12 / cg" |
|
409 |
"Modified: / 12.11.2001 / 19:36:16 / cg" |
|
410 |
! |
|
411 |
||
412 |
forceUpdateList |
|
413 |
self categoryList setValue:#(). |
|
414 |
self updateList. |
|
415 |
self categoryList changed. |
|
416 |
! |
|
417 |
||
418 |
selectionChangedByClick |
|
419 |
"we are not interested in that - get another notification |
|
420 |
via the changed valueHolder" |
|
421 |
||
422 |
"Created: / 11.2.2000 / 11:39:48 / cg" |
|
423 |
! |
|
424 |
||
425 |
update:something with:aParameter from:changedObject |
|
426 |
|categoryOfClass| |
|
427 |
||
428 |
changedObject == Smalltalk ifTrue:[ |
|
8751 | 429 |
(something == #methodInClass |
430 |
or:[ something == #classComment |
|
431 |
or:[ something == #methodDictionary |
|
432 |
or:[ something == #methodTrap |
|
10365 | 433 |
or:[ something == #methodCoverageInfo |
434 |
or:[ something == #methodInClassRemoved ]]]]]) ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
435 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
436 |
]. |
8751 | 437 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
438 |
(something == #classVariables |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
439 |
or:[something == #classDefinition]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
440 |
categoryOfClass := aParameter category. |
6702 | 441 |
(self selectedCategoriesStrings includes:categoryOfClass) ifTrue:[ |
5591 | 442 |
"/ self halt. |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
443 |
self updateOutputGenerator. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
444 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
445 |
]. |
5591 | 446 |
]. |
447 |
||
448 |
"/ changedObject == ChangeSet ifTrue:[ |
|
449 |
"/ something == #addChange: ifTrue:[ |
|
450 |
"/ ^ self |
|
451 |
"/ ] |
|
452 |
"/ ]. |
|
453 |
||
454 |
super update:something with:aParameter from:changedObject |
|
455 |
||
10365 | 456 |
"Modified: / 20-07-2011 / 18:50:04 / cg" |
5591 | 457 |
! ! |
458 |
||
459 |
!ClassCategoryList methodsFor:'drag & drop'! |
|
460 |
||
6468 | 461 |
canDropContext:aDropContext |
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
462 |
|cat objects droppedClasses| |
5591 | 463 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
464 |
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
|
465 |
(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
|
466 |
|
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
467 |
(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
|
468 |
droppedClasses := objects. |
6468 | 469 |
(droppedClasses contains:[:aClass | aClass isPrivate not]) ifFalse:[^ false]. |
5591 | 470 |
|
471 |
cat := self categoryAtTargetPointOf:aDropContext. |
|
6492 | 472 |
cat isNil ifTrue:[ ^ false ]. |
473 |
cat = '* obsolete *' ifTrue:[ ^ false ]. |
|
5591 | 474 |
|
6468 | 475 |
(droppedClasses contains:[:aClass | aClass category ~= cat]) ifFalse:[^ false]. |
5591 | 476 |
^ true. |
7119 | 477 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
478 |
"Modified: / 17-10-2006 / 18:28:04 / cg" |
5591 | 479 |
! |
480 |
||
481 |
categoryAtTargetPointOf:aDropContext |
|
482 |
|p categoryListView lineNr cat| |
|
483 |
||
484 |
p := aDropContext targetPoint. |
|
485 |
||
486 |
categoryListView := aDropContext targetWidget. |
|
487 |
||
488 |
lineNr := categoryListView lineAtY:p y. |
|
489 |
lineNr isNil ifTrue:[^ nil]. |
|
490 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
491 |
cat := rawCategoryList at:lineNr. |
5591 | 492 |
cat := cat string. |
493 |
cat = self class nameListEntryForALL ifTrue:[^ nil]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
494 |
|
6702 | 495 |
(cat endsWith:(self stringForExtensions)) ifTrue:[ |
496 |
cat := cat copyWithoutLast:(self stringForExtensions size) |
|
497 |
]. |
|
5591 | 498 |
^ cat |
499 |
! |
|
500 |
||
6468 | 501 |
doDropContext:aDropContext |
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
502 |
|cat objects| |
5591 | 503 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
504 |
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
|
505 |
(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
|
506 |
cat := self categoryAtTargetPointOf:aDropContext. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
507 |
cat notNil ifTrue:[ |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
508 |
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
|
509 |
]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
510 |
^ self |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
511 |
]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
512 |
(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
|
513 |
self dropClassFiles:objects. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
514 |
^ self |
5591 | 515 |
]. |
7119 | 516 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
517 |
"Modified: / 17-10-2006 / 18:29:25 / cg" |
5591 | 518 |
! ! |
519 |
||
520 |
!ClassCategoryList methodsFor:'generators'! |
|
521 |
||
522 |
makeGenerator |
|
523 |
"return a generator which enumerates the classes from the selected category." |
|
524 |
||
8751 | 525 |
|cats hideUnloadedClasses allName nameSpaceFilter packageFilter |
12043 | 526 |
showChangedClasses showUnloaded showUndocumented showExtendedClasses inclusionTest changedClasses| |
5591 | 527 |
|
6702 | 528 |
cats := self selectedCategoriesStrings. |
5591 | 529 |
cats size == 0 ifTrue:[ |
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
530 |
^ #() |
5591 | 531 |
]. |
532 |
||
533 |
allName := self class nameListEntryForALL. |
|
534 |
||
8345
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
535 |
(cats includes:allName) ifTrue:[ |
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
536 |
inGeneratorHolder value isOrderedCollection ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
537 |
cats := rawCategoryList copyWithout:allName. |
8345
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 |
]. |
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
540 |
|
8734 | 541 |
showChangedClasses := cats includes:(self class nameListEntryForChanged). |
8751 | 542 |
showUnloaded := cats includes:(self class nameListEntryForUnloaded). |
543 |
showUndocumented := cats includes:(self class nameListEntryForUndocumented). |
|
12043 | 544 |
showExtendedClasses := cats includes:(self class nameListEntryForExtendedClasses). |
8734 | 545 |
|
5591 | 546 |
hideUnloadedClasses := self hideUnloadedClasses value ? false. |
547 |
nameSpaceFilter := self nameSpaceFilter value. |
|
548 |
nameSpaceFilter notNil ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
549 |
(nameSpaceFilter includes:allName) ifTrue:[nameSpaceFilter := nil]. |
5591 | 550 |
]. |
551 |
packageFilter := self packageFilter value. |
|
552 |
packageFilter notNil ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
553 |
(packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
5591 | 554 |
]. |
555 |
||
556 |
(cats includes:allName) ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
557 |
hideUnloadedClasses ifTrue:[ |
8751 | 558 |
inclusionTest := [:cls | cls isLoaded]. |
559 |
] ifFalse:[ |
|
560 |
inclusionTest := [:cls | true]. |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
561 |
]. |
8751 | 562 |
] ifFalse:[ |
563 |
inclusionTest := |
|
564 |
[:cls | |
|
565 |
|cat isLoaded included| |
|
566 |
||
567 |
isLoaded := cls isLoaded. |
|
568 |
included := isLoaded not and:[ showUnloaded ]. |
|
569 |
included ifFalse:[ |
|
570 |
(hideUnloadedClasses not or:[isLoaded]) ifTrue:[ |
|
571 |
cat := cls category ? '* no category *'. |
|
572 |
included := cats includes:cat. |
|
573 |
included ifFalse:[ |
|
574 |
included := showChangedClasses |
|
575 |
and:[ (changedClasses includes:cls theNonMetaclass) |
|
576 |
or:[(changedClasses includes:cls theMetaclass)] ]. |
|
577 |
included ifFalse:[ |
|
11880 | 578 |
included := showUndocumented |
579 |
and:[ isLoaded |
|
580 |
and:[ cls isPrivate not |
|
581 |
and:[ (cls theMetaclass includesSelector:#documentation) not ]]]. |
|
12043 | 582 |
included ifFalse:[ |
583 |
included := showExtendedClasses |
|
584 |
and:[ cls hasExtensions ]. |
|
585 |
]. |
|
8751 | 586 |
]. |
587 |
]. |
|
588 |
]. |
|
589 |
]. |
|
590 |
included |
|
591 |
]. |
|
5591 | 592 |
]. |
593 |
||
8748 | 594 |
^ Iterator on:[:whatToDo | |
8751 | 595 |
showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ]. |
8734 | 596 |
|
8751 | 597 |
Smalltalk allClassesDo:[:cls | |
598 |
(cls isRealNameSpace) ifFalse:[ |
|
599 |
(inclusionTest value:cls) ifTrue:[ |
|
600 |
(nameSpaceFilter isNil |
|
601 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
|
602 |
(packageFilter isNil |
|
603 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
|
604 |
whatToDo value:cls |
|
605 |
] |
|
606 |
] |
|
607 |
]. |
|
608 |
]. |
|
609 |
]. |
|
610 |
]. |
|
5591 | 611 |
|
7504 | 612 |
"Created: / 05-02-2000 / 13:42:12 / cg" |
613 |
"Modified: / 10-11-2006 / 17:13:26 / cg" |
|
5591 | 614 |
! ! |
615 |
||
616 |
!ClassCategoryList methodsFor:'private'! |
|
617 |
||
618 |
colorizeCategoryAsChanged:category |
|
619 |
|colorizedCategoryItem categoryList idx| |
|
620 |
||
621 |
colorizedCategoryItem := self colorizeForChangedCode:category copy asText. |
|
622 |
||
623 |
categoryList := self categoryList value. |
|
624 |
idx := categoryList indexOf:category. |
|
625 |
idx ~~ 0 ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
626 |
((categoryList at:idx) sameStringAndEmphasisAs:colorizedCategoryItem) ifFalse:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
627 |
categoryList at:idx put:colorizedCategoryItem. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
628 |
self categoryList changed. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
629 |
] |
5591 | 630 |
]. |
631 |
! |
|
632 |
||
633 |
listOfCategories |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
634 |
|categories categoriesBag hideUnloadedClasses generator nameSpaceFilter packageFilter allName |
7504 | 635 |
categoriesWithExtensions categoriesWithChangedCode categoriesWithRemoteChangedCode |
12043 | 636 |
classesInChangeSet classesInRemoteChangeSet classesWithExtensions |
637 |
numClassesInChangeSet numClasses numUnloaded numUndocumented numExtendedClasses pseudoEntryColor| |
|
5591 | 638 |
|
639 |
allName := self class nameListEntryForALL. |
|
640 |
||
641 |
hideUnloadedClasses := self hideUnloadedClasses value. |
|
642 |
nameSpaceFilter := self nameSpaceFilter value. |
|
643 |
nameSpaceFilter notNil ifTrue:[ |
|
5950 | 644 |
(nameSpaceFilter includes:allName) ifTrue:[nameSpaceFilter := nil]. |
5591 | 645 |
]. |
646 |
packageFilter := self packageFilter value. |
|
647 |
packageFilter notNil ifTrue:[ |
|
5950 | 648 |
(packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
5591 | 649 |
]. |
650 |
||
12043 | 651 |
numClasses := numUndocumented := numUnloaded := numClassesInChangeSet := numExtendedClasses := 0. |
8734 | 652 |
|
5591 | 653 |
categories := Set new. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
654 |
categoriesBag := Bag new. |
5591 | 655 |
categoriesWithExtensions := Set new. |
656 |
categoriesWithChangedCode := Set new. |
|
7504 | 657 |
categoriesWithRemoteChangedCode := Set new. |
5591 | 658 |
|
6978 | 659 |
classesInChangeSet := ChangeSet current changedClasses. |
660 |
classesInChangeSet := classesInChangeSet collect:[:eachClass | eachClass theNonMetaclass]. |
|
5591 | 661 |
|
7504 | 662 |
classesInRemoteChangeSet := SmallTeam isNil ifTrue:[#()] ifFalse:[ SmallTeam changedClasses ]. |
663 |
classesInRemoteChangeSet := classesInRemoteChangeSet collect:[:each | each theNonMetaclass]. |
|
664 |
||
12043 | 665 |
classesWithExtensions := IdentitySet new. |
666 |
||
5591 | 667 |
classes := IdentitySet new. |
668 |
inGeneratorHolder isNil ifTrue:[ |
|
5950 | 669 |
Smalltalk allClassesDo:[:cls | |
8751 | 670 |
|cat isLoaded| |
671 |
||
672 |
(cls isRealNameSpace) ifFalse:[ |
|
673 |
(nameSpaceFilter isNil |
|
674 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
|
675 |
(packageFilter isNil |
|
676 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
|
5591 | 677 |
|
8751 | 678 |
isLoaded := cls isLoaded. |
679 |
isLoaded ifTrue:[ |
|
11880 | 680 |
numUnloaded := numUnloaded + 1. |
681 |
cls isPrivate ifFalse:[ |
|
682 |
(cls theMetaclass includesSelector:#documentation) ifFalse:[ |
|
683 |
numUndocumented := numUndocumented + 1. |
|
684 |
]. |
|
8751 | 685 |
]. |
686 |
]. |
|
687 |
||
688 |
(hideUnloadedClasses not or:[isLoaded]) |
|
689 |
ifTrue:[ |
|
8734 | 690 |
numClasses := numClasses + 1. |
691 |
||
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
692 |
cat := cls category ? '* no category *'. |
5950 | 693 |
cat isString ifFalse:[self halt:'oops - strange category']. |
694 |
categories add:cat. |
|
695 |
classes add:cls. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
696 |
categoriesBag add:cat. |
5591 | 697 |
|
6978 | 698 |
(classesInChangeSet includes:cls theNonMetaclass) ifTrue:[ |
5950 | 699 |
categoriesWithChangedCode add:cat |
7504 | 700 |
]. |
701 |
(classesInRemoteChangeSet includes:cls theNonMetaclass) ifTrue:[ |
|
702 |
categoriesWithRemoteChangedCode add:cat |
|
703 |
]. |
|
704 |
cls hasExtensions ifTrue:[ |
|
12043 | 705 |
categoriesWithExtensions add:cat. |
706 |
classesWithExtensions add:cls. |
|
707 |
numExtendedClasses := numExtendedClasses + 1. |
|
5950 | 708 |
]. |
709 |
] |
|
710 |
] |
|
711 |
] |
|
712 |
] |
|
713 |
]. |
|
5591 | 714 |
|
5950 | 715 |
"/ those are simulated - in ST/X, empty categories do not |
716 |
"/ really exist; however, during browsing, it makes sense. |
|
717 |
AdditionalEmptyCategories size > 0 ifTrue:[ |
|
718 |
"/ remove those that are present ... |
|
719 |
AdditionalEmptyCategories := AdditionalEmptyCategories select:[:cat | (categories includes:cat) not]. |
|
720 |
categories addAll:AdditionalEmptyCategories. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
721 |
categoriesBag addAll:AdditionalEmptyCategories withOccurrences:0. |
5950 | 722 |
]. |
5591 | 723 |
] ifFalse:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
724 |
|setOfCategories| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
725 |
|
5950 | 726 |
generator := inGeneratorHolder value. |
727 |
generator isNil ifTrue:[^ #() ]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
728 |
setOfCategories := Set withAll:generator. |
8345
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
729 |
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
|
730 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
731 |
Smalltalk allClassesDo:[:each | |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
732 |
|cat| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
733 |
|
11927 | 734 |
each isNameSpace ifFalse:[ |
11900 | 735 |
cat := each category string asSymbol. |
736 |
(setOfCategories includes:cat) ifTrue:[ |
|
737 |
categoriesBag add:cat. |
|
738 |
]. |
|
739 |
] |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
740 |
]. |
5591 | 741 |
]. |
742 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
743 |
pseudoEntryColor := self class pseudoEntryForegroundColor. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
744 |
|
5591 | 745 |
categories := categories asOrderedCollection. |
746 |
||
747 |
categories sort. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
748 |
rawCategoryList := categories. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
749 |
|
5950 | 750 |
categories := |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
751 |
categories collect:[:cat | |
11944 | 752 |
|item isInChangeSet| |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
753 |
|
11944 | 754 |
isInChangeSet := categoriesWithChangedCode includes:cat. |
755 |
isInChangeSet ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
756 |
item := self colorizeForChangedCode:cat copy asText |
5950 | 757 |
] ifFalse:[ |
758 |
(categoriesWithExtensions includes:cat) ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
759 |
item := self colorizeForDifferentPackage:cat copy asText |
5950 | 760 |
"/ cannot add a + here - need separate list for presentation and filter |
6702 | 761 |
"/ cat , (self colorizeForDifferentPackage:self stringForExtensions) |
5950 | 762 |
] ifFalse:[ |
7504 | 763 |
(categoriesWithRemoteChangedCode includes:cat) ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
764 |
item := self colorizeForChangedCodeInSmallTeam:cat copy asText |
7504 | 765 |
] ifFalse:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
766 |
item := cat |
7504 | 767 |
] |
5950 | 768 |
] |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
769 |
]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
770 |
item := item , ((' (%1)' bindWith:(categoriesBag occurrencesOf:cat)) |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
771 |
colorizeAllWith:pseudoEntryColor). |
11944 | 772 |
isInChangeSet ifTrue:[ |
773 |
item := item , self class markForBeingInChangeList |
|
774 |
]. |
|
775 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
776 |
item |
5950 | 777 |
]. |
8734 | 778 |
|
11907 | 779 |
numUndocumented > 0 ifTrue:[ |
780 |
rawCategoryList add:self class nameListEntryForUndocumented. |
|
781 |
categories add:((self class nameListEntryForUndocumentedWithCount bindWith:numUndocumented) allItalic colorizeAllWith:pseudoEntryColor). |
|
8751 | 782 |
]. |
11907 | 783 |
numUnloaded > 0 ifTrue:[ |
784 |
rawCategoryList add:self class nameListEntryForUnloaded. |
|
785 |
categories add:((self class nameListEntryForUnloadedWithCount bindWith:numUnloaded) allItalic colorizeAllWith:pseudoEntryColor). |
|
8751 | 786 |
]. |
12043 | 787 |
numExtendedClasses > 0 ifTrue:[ |
788 |
rawCategoryList add:self class nameListEntryForExtendedClasses. |
|
789 |
categories add:((self class nameListEntryForExtendedClassesWithCount bindWith:numExtendedClasses) allItalic colorizeAllWith:pseudoEntryColor). |
|
790 |
]. |
|
12465
aed594275d40
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12043
diff
changeset
|
791 |
numClassesInChangeSet := (ChangeSet current changedClasses collect:[:c | c theNonMetaclass]) asSet size. |
8734 | 792 |
numClassesInChangeSet > 0 ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
793 |
rawCategoryList addFirst:self class nameListEntryForChanged. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
794 |
categories addFirst:((self class nameListEntryForChangedWithCount bindWith:numClassesInChangeSet) allItalic colorizeAllWith:pseudoEntryColor). |
5591 | 795 |
]. |
8734 | 796 |
|
797 |
categories size > 0 ifTrue:[ |
|
798 |
categories size == 1 ifTrue:[ |
|
799 |
self classCategoryLabelHolder value:(categories first) |
|
800 |
]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
801 |
rawCategoryList addFirst:self class nameListEntryForALL. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
802 |
categories addFirst:((self class nameListEntryForALLWithCount bindWith:numClasses) allItalic colorizeAllWith:pseudoEntryColor). |
5591 | 803 |
]. |
8734 | 804 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
805 |
cookedCategoryList := categories. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
806 |
^ rawCategoryList. |
5591 | 807 |
|
6950 | 808 |
"Created: / 05-02-2000 / 13:42:12 / cg" |
11944 | 809 |
"Modified: / 27-10-2012 / 12:34:19 / cg" |
5591 | 810 |
! |
811 |
||
812 |
listView |
|
8741 | 813 |
^ self componentAt:#List |
5591 | 814 |
! |
815 |
||
816 |
makeDependent |
|
817 |
Smalltalk addDependent:self. |
|
818 |
ChangeSet addDependent:self. |
|
819 |
||
820 |
"Created: / 5.2.2000 / 13:42:13 / cg" |
|
821 |
! |
|
822 |
||
823 |
makeIndependent |
|
824 |
Smalltalk removeDependent:self. |
|
825 |
ChangeSet removeDependent:self. |
|
826 |
||
827 |
"Created: / 5.2.2000 / 13:42:13 / cg" |
|
828 |
! |
|
829 |
||
830 |
makeItemVisible:item |
|
831 |
|idx listView| |
|
832 |
||
833 |
idx := categoryList value indexOf:item. |
|
834 |
idx ~~ 0 ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
835 |
(listView := self listView) notNil ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
836 |
listView makeLineVisible:idx. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
837 |
] |
5591 | 838 |
] |
839 |
! |
|
840 |
||
841 |
makeSelectionOtherThanAllVisible |
|
842 |
|selectedCategories item| |
|
843 |
||
844 |
selectedCategories := self selectedCategoriesStrings. |
|
845 |
"/ the first item after the *all* item |
|
846 |
item := (selectedCategories copy remove:self class nameListEntryForALL; yourself) first. |
|
847 |
self makeItemVisible:item. |
|
848 |
! |
|
849 |
||
850 |
release |
|
851 |
super release. |
|
852 |
||
853 |
categoryList removeDependent:self. |
|
854 |
! |
|
855 |
||
856 |
selectedCategoriesStrings |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
857 |
|selectedCategories stringForExtensions| |
6950 | 858 |
|
859 |
stringForExtensions := self stringForExtensions. |
|
5591 | 860 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
861 |
selectedCategories := self selectedCategories value ? #(). |
6950 | 862 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
863 |
"/ selectedCategories := selectedCategories |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
864 |
"/ collect:[:each | |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
865 |
"/ |s| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
866 |
"/ s := each string. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
867 |
"/ (s endsWith:stringForExtensions) ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
868 |
"/ s := s copyWithoutLast:(stringForExtensions size). |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
869 |
"/ ]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
870 |
"/ s |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
871 |
"/ ]. |
5591 | 872 |
^ selectedCategories |
6950 | 873 |
|
874 |
"Modified: / 23-08-2006 / 11:38:26 / cg" |
|
5591 | 875 |
! |
876 |
||
6702 | 877 |
stringForExtensions |
878 |
^ ' [ + ]' |
|
879 |
! |
|
880 |
||
5591 | 881 |
updateList |
882 |
|oldList newList oldSelection newSelection prevClasses |
|
883 |
selectedCategoriesHolder| |
|
884 |
||
885 |
selectedCategoriesHolder := self selectedCategories. |
|
886 |
oldSelection := selectedCategoriesHolder value ? #(). |
|
887 |
prevClasses := classes copy. |
|
888 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
889 |
newList := self listOfCategories. "/ sigh - sideeffect of setting rawList |
5591 | 890 |
oldList := (self categoryList value) ? #(). |
891 |
(newList sameContentsAs:oldList whenComparedWith:[:a :b | a sameStringAndEmphasisAs: b]) |
|
892 |
ifFalse:[ |
|
10580 | 893 |
"/ a real change, or only emphasis ? |
894 |
(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
|
895 |
"/ only emphasis |
10580 | 896 |
oldSelection size > 0 ifTrue:[ |
897 |
selectedCategoriesHolder removeDependent:self. |
|
898 |
selectedCategoriesHolder value:#(). |
|
899 |
selectedCategoriesHolder addDependent:self. |
|
900 |
]. |
|
901 |
categoryList value:newList. |
|
5591 | 902 |
|
10580 | 903 |
oldSelection size > 0 ifTrue:[ |
904 |
newSelection := oldSelection select:[:cat | newList includes:cat]. |
|
905 |
selectedCategoriesHolder value:newSelection. |
|
906 |
] |
|
907 |
] ifFalse:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
908 |
"/ a real change |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
909 |
|
10580 | 910 |
categoryList value:newList. |
911 |
||
912 |
"/ in case the same categories are present, but classes have changed ... |
|
913 |
(prevClasses isNil or:[(classes identicalContentsAs:prevClasses) not]) ifTrue:[ |
|
914 |
self updateOutputGenerator. |
|
915 |
] |
|
916 |
] |
|
5591 | 917 |
] ifTrue:[ |
10580 | 918 |
"/ in case the same categories are present, but classes have changed ... |
919 |
(prevClasses isNil or:[(classes identicalContentsAs:prevClasses) not]) ifTrue:[ |
|
920 |
self updateOutputGenerator. |
|
921 |
] |
|
5591 | 922 |
]. |
923 |
listValid := true. |
|
924 |
||
10580 | 925 |
"Created: / 05-02-2000 / 13:42:13 / cg" |
926 |
"Modified: / 17-08-2011 / 09:52:13 / cg" |
|
5591 | 927 |
! ! |
928 |
||
929 |
!ClassCategoryList methodsFor:'setup'! |
|
930 |
||
5909 | 931 |
commonPostBuild |
5591 | 932 |
|listView| |
933 |
||
934 |
listView := self listView. |
|
935 |
listView notNil ifTrue:[ |
|
5909 | 936 |
listView scrollWhenUpdating:nil |
5591 | 937 |
]. |
5909 | 938 |
super commonPostBuild |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
939 |
! |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
940 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
941 |
postBuildCategoryListView:aView |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
942 |
categoryListView := aView. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
943 |
categoryListView visualBlock:[:view :lineNr | cookedCategoryList at:lineNr]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
944 |
categoryListView selectedVisualBlock:[:view :lineNr | (cookedCategoryList at:lineNr) string] |
5591 | 945 |
! ! |
946 |
||
947 |
!ClassCategoryList methodsFor:'special'! |
|
948 |
||
949 |
addAdditionalCategory:aCategory |
|
950 |
"/ those are simulated - in ST/X, empty categories do not |
|
951 |
"/ really exist; however, during browsing, it makes sense. |
|
952 |
||
8373 | 953 |
self class addAdditionalCategory:aCategory |
5591 | 954 |
! |
955 |
||
956 |
removeAdditionalCategories:aListOfCategories |
|
8373 | 957 |
self class removeAdditionalCategories:aListOfCategories |
5591 | 958 |
! |
959 |
||
960 |
removeAllAdditionalCategories |
|
8373 | 961 |
self class removeAllAdditionalCategories |
8446 | 962 |
! |
963 |
||
964 |
renameAdditionalCategories:oldNames to:newName |
|
965 |
"/ those are simulated - in ST/X, empty categories do not |
|
966 |
"/ really exist; however, during browsing, it makes sense. |
|
967 |
||
968 |
self class renameAdditionalCategories:oldNames to:newName |
|
5591 | 969 |
! ! |
970 |
||
971 |
!ClassCategoryList class methodsFor:'documentation'! |
|
972 |
||
973 |
version |
|
12465
aed594275d40
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12043
diff
changeset
|
974 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.41 2013-03-13 22:36:14 cg Exp $' |
9005 | 975 |
! |
976 |
||
977 |
version_CVS |
|
12465
aed594275d40
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12043
diff
changeset
|
978 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.41 2013-03-13 22:36:14 cg Exp $' |
5591 | 979 |
! ! |
12465
aed594275d40
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12043
diff
changeset
|
980 |