author | Claus Gittinger <cg@exept.de> |
Tue, 14 Mar 2017 20:30:21 +0100 | |
changeset 17465 | 27a2e4012a0a |
parent 14026 | 4c197be9097f |
child 15566 | 184cea584be5 |
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 |
^ #( |
|
14026
4c197be9097f
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
166 |
environmentHolder |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
167 |
#(doubleClickChannel action) |
8700 | 168 |
#forceGeneratorTrigger |
169 |
#hideUnloadedClasses |
|
170 |
#immediateUpdate |
|
171 |
#inGeneratorHolder |
|
172 |
#menuHolder |
|
173 |
#nameSpaceFilter |
|
174 |
#organizerMode |
|
175 |
#outGeneratorHolder |
|
176 |
#packageFilter |
|
177 |
#selectedCategories |
|
178 |
#selectionChangeCondition |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
179 |
#showCoverageInformation |
8700 | 180 |
#slaveMode |
181 |
#updateTrigger |
|
5591 | 182 |
). |
10351 | 183 |
|
14026
4c197be9097f
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
184 |
"Modified: / 24-02-2014 / 10:37:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 185 |
! ! |
186 |
||
8373 | 187 |
!ClassCategoryList class methodsFor:'special'! |
188 |
||
189 |
addAdditionalCategory:aCategory |
|
190 |
"/ those are simulated - in ST/X, empty categories do not |
|
191 |
"/ really exist; however, during browsing, it makes sense. |
|
192 |
||
193 |
AdditionalEmptyCategories isNil ifTrue:[ |
|
194 |
AdditionalEmptyCategories := Set new. |
|
195 |
]. |
|
196 |
AdditionalEmptyCategories add:aCategory. |
|
197 |
Smalltalk changed:#organization with:(nil -> aCategory). "/ not really ... to force update |
|
198 |
! |
|
199 |
||
200 |
removeAdditionalCategories:aListOfCategories |
|
201 |
"/ those are simulated - in ST/X, empty categories do not |
|
202 |
"/ really exist; however, during browsing, it makes sense. |
|
203 |
||
204 |
AdditionalEmptyCategories isNil ifTrue:[^ self]. |
|
205 |
aListOfCategories do:[:eachCategory | |
|
206 |
AdditionalEmptyCategories remove:eachCategory ifAbsent:nil. |
|
207 |
]. |
|
208 |
||
209 |
Smalltalk changed:#organization "/ not really ... to force update |
|
210 |
! |
|
211 |
||
212 |
removeAllAdditionalCategories |
|
213 |
"/ those are simulated - in ST/X, empty categories do not |
|
214 |
"/ really exist; however, during browsing, it makes sense. |
|
215 |
||
216 |
AdditionalEmptyCategories := nil |
|
8446 | 217 |
! |
218 |
||
219 |
renameAdditionalCategories:oldNames to:newName |
|
220 |
"/ those are simulated - in ST/X, empty categories do not |
|
221 |
"/ really exist; however, during browsing, it makes sense. |
|
222 |
||
223 |
self removeAdditionalCategories:oldNames. |
|
224 |
self addAdditionalCategory:newName. |
|
8373 | 225 |
! ! |
226 |
||
5591 | 227 |
!ClassCategoryList methodsFor:'aspects'! |
228 |
||
229 |
categoryList |
|
230 |
categoryList isNil ifTrue:[ |
|
231 |
categoryList := ValueHolder new. |
|
232 |
]. |
|
233 |
^ categoryList |
|
234 |
||
235 |
"Created: / 25.2.2000 / 02:23:08 / cg" |
|
236 |
! |
|
237 |
||
238 |
categoryList:aValueHolder |
|
239 |
categoryList notNil ifTrue:[ |
|
240 |
categoryList removeDependent:self |
|
241 |
]. |
|
242 |
categoryList := aValueHolder. |
|
243 |
categoryList notNil ifTrue:[ |
|
244 |
categoryList addDependent:self |
|
245 |
]. |
|
246 |
||
247 |
"Created: / 18.8.2000 / 15:21:42 / cg" |
|
248 |
! |
|
249 |
||
250 |
classCategoryLabelHolder |
|
251 |
^ self pseudoListLabelHolder |
|
252 |
! |
|
253 |
||
254 |
selectedCategories |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
255 |
^ self selectionHolder |
5591 | 256 |
! |
257 |
||
258 |
selectedCategories:aValueHolder |
|
259 |
^ self selectionHolder:aValueHolder |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
260 |
! |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
261 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
262 |
selectionHolder |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
263 |
"/ self halt. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
264 |
^ super selectionHolder |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
265 |
! |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
266 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
267 |
selectionHolder:aValueHolder |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
268 |
"/ self halt. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
269 |
super selectionHolder:aValueHolder |
5591 | 270 |
! ! |
271 |
||
272 |
!ClassCategoryList methodsFor:'change & update'! |
|
273 |
||
274 |
delayedUpdate:something with:aParameter from:changedObject |
|
6702 | 275 |
|selectedCategories allSelectedBefore |
12520
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
276 |
nameListEntryForALL cls categoryOfClass wg| |
5591 | 277 |
|
278 |
selectedCategories := self selectedCategoriesStrings. |
|
279 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13193
diff
changeset
|
280 |
changedObject == environment ifTrue:[ |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
281 |
((something == #classVariables) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
282 |
or:[something == #classDefinition]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
283 |
listValid == true ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
284 |
categoryOfClass := aParameter category. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
285 |
(rawCategoryList includes:categoryOfClass) ifFalse:[ |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
286 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
287 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
288 |
slaveMode value ~~ true ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
289 |
(selectedCategories includes:categoryOfClass) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
290 |
"/ a selected class has changed |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
291 |
"/ 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
|
292 |
"/ 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
|
293 |
"/ self enqueueDelayedUpdateOutputGenerator |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
294 |
self enqueueMessage:#updateOutputGenerator for:self arguments:#() |
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 |
]. |
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 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
299 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
300 |
something == #newClass ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
301 |
categoryOfClass := aParameter category. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
302 |
listValid == false ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
303 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
304 |
]. |
5591 | 305 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
306 |
(rawCategoryList includes:categoryOfClass) ifFalse:[ |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
307 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
308 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
309 |
|
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
310 |
slaveMode value ~~ true ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
311 |
(selectedCategories includes:categoryOfClass) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
312 |
self enqueueDelayedUpdateOutputGenerator |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
313 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
314 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
315 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
316 |
]. |
12520
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
317 |
something == #projectOrganization ifTrue:[ |
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
318 |
listValid == false ifTrue:[ |
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
319 |
^ self |
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
320 |
]. |
12524
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
321 |
aParameter isNil ifTrue:[ |
12520
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
322 |
self invalidateList. |
12524
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
323 |
slaveMode value ~~ true ifTrue:[ |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
324 |
selectedCategories notEmptyOrNil ifTrue:[ |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
325 |
self enqueueDelayedUpdateOutputGenerator |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
326 |
]. |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
327 |
] |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
328 |
] ifFalse:[ |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
329 |
cls := aParameter first. |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
330 |
categoryOfClass := cls category. |
12520
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
331 |
|
12524
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
332 |
(rawCategoryList includes:categoryOfClass) ifFalse:[ |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
333 |
self invalidateList. |
12520
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
334 |
]. |
12524
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
335 |
|
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
336 |
slaveMode value ~~ true ifTrue:[ |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
337 |
(selectedCategories includes:categoryOfClass) ifTrue:[ |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
338 |
self enqueueDelayedUpdateOutputGenerator |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
339 |
]. |
b01bf4e76194
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12520
diff
changeset
|
340 |
] |
12520
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
341 |
]. |
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
342 |
^ self |
b00df8bffe99
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12487
diff
changeset
|
343 |
]. |
5591 | 344 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
345 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
346 |
|
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
347 |
(something == #classRemove |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
348 |
or:[something == #projectOrganization |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
349 |
or:[something == #organization]]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
350 |
slaveMode value ~~ true ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
351 |
"/ sorry: cannot filter on category (already changed to #removed) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
352 |
self enqueueDelayedUpdateOutputGenerator |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
353 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
354 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
355 |
^ self |
5591 | 356 |
]. |
357 |
||
358 |
changedObject == ChangeSet ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
359 |
"/ remove all other change notifications from the eventQueue |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
360 |
wg := self windowGroup. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
361 |
wg isNil ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
362 |
"/ oops - should no longer be dependent... |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
363 |
changedObject removeDependent:self. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
364 |
] ifFalse:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
365 |
wg sensor |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
366 |
flushEventsFor:self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
367 |
where:[:ev | ev isMessageSendEvent |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
368 |
and:[ev selector == #delayedUpdate:with:from: |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
369 |
and:[(ev arguments at:3) == ChangeSet]]]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
370 |
]. |
5591 | 371 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
372 |
something == #addChange: ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
373 |
"/ only need to invalidate, if that change changes my emphasis |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
374 |
"/ (i.e. if its a new methodChange) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
375 |
self window topView shown ifFalse:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
376 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
377 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
378 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
379 |
|
5591 | 380 |
"/ self invalidateList. |
381 |
||
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
382 |
aParameter isMethodChange ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
383 |
aParameter changeClass notNil ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
384 |
(ChangeSet current |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
385 |
count:[:chg | chg notNil and:[chg isMethodChange |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
386 |
and:[ chg className = aParameter className ]]]) |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
387 |
== 1 ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
388 |
"/ that methodChange is the first for this method. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
389 |
self colorizeCategoryAsChanged:(aParameter changeClass category). |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
390 |
] |
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 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
393 |
^ self |
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 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
397 |
^ self |
5591 | 398 |
]. |
399 |
||
400 |
changedObject == nameSpaceFilter ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
401 |
"/ all might be more or less than before ... |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
402 |
allSelected := false. |
11917
4abec96d769d
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11907
diff
changeset
|
403 |
"/ self invalidateList - done in super |
5591 | 404 |
]. |
405 |
changedObject == packageFilter ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
406 |
"/ 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
|
407 |
allSelected := false. |
4abec96d769d
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11907
diff
changeset
|
408 |
"/ self invalidateList - done in super |
5591 | 409 |
]. |
410 |
||
6702 | 411 |
changedObject == self selectedCategories ifTrue:[ |
11917
4abec96d769d
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11907
diff
changeset
|
412 |
listValid ifFalse:[ |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
413 |
"/ oops - hurry up |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
414 |
self invalidateList. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
415 |
]. |
5591 | 416 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
417 |
nameListEntryForALL := self class nameListEntryForALL. |
5591 | 418 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
419 |
selectedCategories size > 1 ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
420 |
(selectedCategories includes:nameListEntryForALL) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
421 |
self makeSelectionOtherThanAllVisible. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
422 |
] |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
423 |
]. |
5591 | 424 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
425 |
"/ 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
|
426 |
allSelectedBefore := allSelected ? false. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
427 |
allSelected := selectedCategories includes:nameListEntryForALL. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
428 |
(allSelectedBefore and:[allSelected]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
429 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
430 |
]. |
5591 | 431 |
]. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
432 |
changedObject == categoryList ifTrue:[ |
12944
486b9808a1cb
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12718
diff
changeset
|
433 |
self breakPoint:#cg. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
434 |
]. |
5591 | 435 |
super delayedUpdate:something with:aParameter from:changedObject |
436 |
||
437 |
"Created: / 5.2.2000 / 13:42:12 / cg" |
|
438 |
"Modified: / 12.11.2001 / 19:36:16 / cg" |
|
439 |
! |
|
440 |
||
441 |
forceUpdateList |
|
442 |
self categoryList setValue:#(). |
|
443 |
self updateList. |
|
444 |
self categoryList changed. |
|
445 |
! |
|
446 |
||
447 |
selectionChangedByClick |
|
448 |
"we are not interested in that - get another notification |
|
449 |
via the changed valueHolder" |
|
450 |
||
451 |
"Created: / 11.2.2000 / 11:39:48 / cg" |
|
452 |
! |
|
453 |
||
454 |
update:something with:aParameter from:changedObject |
|
455 |
|categoryOfClass| |
|
456 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13193
diff
changeset
|
457 |
changedObject == environment ifTrue:[ |
8751 | 458 |
(something == #methodInClass |
459 |
or:[ something == #classComment |
|
460 |
or:[ something == #methodDictionary |
|
461 |
or:[ something == #methodTrap |
|
10365 | 462 |
or:[ something == #methodCoverageInfo |
463 |
or:[ something == #methodInClassRemoved ]]]]]) ifTrue:[ |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
464 |
^ self |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
465 |
]. |
8751 | 466 |
|
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
467 |
(something == #classVariables |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
468 |
or:[something == #classDefinition]) ifTrue:[ |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
469 |
categoryOfClass := aParameter category. |
6702 | 470 |
(self selectedCategoriesStrings includes:categoryOfClass) ifTrue:[ |
5591 | 471 |
"/ self halt. |
6677
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
472 |
self updateOutputGenerator. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
473 |
]. |
bae57592a094
ignore some updates - speedup
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
474 |
]. |
5591 | 475 |
]. |
476 |
||
477 |
"/ changedObject == ChangeSet ifTrue:[ |
|
478 |
"/ something == #addChange: ifTrue:[ |
|
479 |
"/ ^ self |
|
480 |
"/ ] |
|
481 |
"/ ]. |
|
482 |
||
483 |
super update:something with:aParameter from:changedObject |
|
484 |
||
10365 | 485 |
"Modified: / 20-07-2011 / 18:50:04 / cg" |
5591 | 486 |
! ! |
487 |
||
488 |
!ClassCategoryList methodsFor:'drag & drop'! |
|
489 |
||
6468 | 490 |
canDropContext:aDropContext |
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
491 |
|cat objects droppedClasses| |
5591 | 492 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
493 |
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
|
494 |
(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
|
495 |
|
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
496 |
(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
|
497 |
droppedClasses := objects. |
6468 | 498 |
(droppedClasses contains:[:aClass | aClass isPrivate not]) ifFalse:[^ false]. |
5591 | 499 |
|
500 |
cat := self categoryAtTargetPointOf:aDropContext. |
|
13193
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
501 |
(cat isNil |
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
502 |
or:[ (cat = '* obsolete *') |
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
503 |
or:[ (cat = #'* as yet unknown category *') |
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
504 |
or:[ self class isPseudoCategory:cat ]]]) |
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
505 |
ifTrue:[ ^ false ]. |
5591 | 506 |
|
6468 | 507 |
(droppedClasses contains:[:aClass | aClass category ~= cat]) ifFalse:[^ false]. |
5591 | 508 |
^ true. |
7119 | 509 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
510 |
"Modified: / 17-10-2006 / 18:28:04 / cg" |
5591 | 511 |
! |
512 |
||
513 |
categoryAtTargetPointOf:aDropContext |
|
514 |
|p categoryListView lineNr cat| |
|
515 |
||
516 |
p := aDropContext targetPoint. |
|
517 |
||
518 |
categoryListView := aDropContext targetWidget. |
|
519 |
||
520 |
lineNr := categoryListView lineAtY:p y. |
|
521 |
lineNr isNil ifTrue:[^ nil]. |
|
522 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
523 |
cat := rawCategoryList at:lineNr. |
5591 | 524 |
cat := cat string. |
525 |
cat = self class nameListEntryForALL ifTrue:[^ nil]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
526 |
|
6702 | 527 |
(cat endsWith:(self stringForExtensions)) ifTrue:[ |
12718
73d137def59c
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12610
diff
changeset
|
528 |
cat := cat copyButLast:(self stringForExtensions size) |
6702 | 529 |
]. |
5591 | 530 |
^ cat |
531 |
! |
|
532 |
||
6468 | 533 |
doDropContext:aDropContext |
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
534 |
|cat objects| |
5591 | 535 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
536 |
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
|
537 |
(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
|
538 |
cat := self categoryAtTargetPointOf:aDropContext. |
13193
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
539 |
(cat isNil |
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
540 |
or:[ (cat = '* obsolete *') |
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
541 |
or:[ self class isPseudoCategory:cat ]]) |
4dbbf330a6af
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12944
diff
changeset
|
542 |
ifFalse:[ |
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
543 |
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
|
544 |
]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
545 |
^ self |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
546 |
]. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
547 |
(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
|
548 |
self dropClassFiles:objects. |
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
549 |
^ self |
5591 | 550 |
]. |
7119 | 551 |
|
7425
9e029102ef55
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7119
diff
changeset
|
552 |
"Modified: / 17-10-2006 / 18:29:25 / cg" |
5591 | 553 |
! ! |
554 |
||
555 |
!ClassCategoryList methodsFor:'generators'! |
|
556 |
||
557 |
makeGenerator |
|
558 |
"return a generator which enumerates the classes from the selected category." |
|
559 |
||
8751 | 560 |
|cats hideUnloadedClasses allName nameSpaceFilter packageFilter |
12043 | 561 |
showChangedClasses showUnloaded showUndocumented showExtendedClasses inclusionTest changedClasses| |
5591 | 562 |
|
6702 | 563 |
cats := self selectedCategoriesStrings. |
5591 | 564 |
cats size == 0 ifTrue:[ |
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
565 |
^ #() |
5591 | 566 |
]. |
567 |
||
568 |
allName := self class nameListEntryForALL. |
|
569 |
||
8345
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
570 |
(cats includes:allName) ifTrue:[ |
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
571 |
inGeneratorHolder value isOrderedCollection ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
572 |
cats := rawCategoryList copyWithout:allName. |
8345
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
573 |
] |
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
574 |
]. |
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
575 |
|
8734 | 576 |
showChangedClasses := cats includes:(self class nameListEntryForChanged). |
8751 | 577 |
showUnloaded := cats includes:(self class nameListEntryForUnloaded). |
578 |
showUndocumented := cats includes:(self class nameListEntryForUndocumented). |
|
12043 | 579 |
showExtendedClasses := cats includes:(self class nameListEntryForExtendedClasses). |
8734 | 580 |
|
5591 | 581 |
hideUnloadedClasses := self hideUnloadedClasses value ? false. |
582 |
nameSpaceFilter := self nameSpaceFilter value. |
|
583 |
nameSpaceFilter notNil ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
584 |
(nameSpaceFilter includes:allName) ifTrue:[nameSpaceFilter := nil]. |
5591 | 585 |
]. |
586 |
packageFilter := self packageFilter value. |
|
587 |
packageFilter notNil ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
588 |
(packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
5591 | 589 |
]. |
590 |
||
591 |
(cats includes:allName) ifTrue:[ |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
592 |
hideUnloadedClasses ifTrue:[ |
8751 | 593 |
inclusionTest := [:cls | cls isLoaded]. |
594 |
] ifFalse:[ |
|
595 |
inclusionTest := [:cls | true]. |
|
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
596 |
]. |
8751 | 597 |
] ifFalse:[ |
598 |
inclusionTest := |
|
599 |
[:cls | |
|
600 |
|cat isLoaded included| |
|
601 |
||
602 |
isLoaded := cls isLoaded. |
|
603 |
included := isLoaded not and:[ showUnloaded ]. |
|
604 |
included ifFalse:[ |
|
605 |
(hideUnloadedClasses not or:[isLoaded]) ifTrue:[ |
|
606 |
cat := cls category ? '* no category *'. |
|
607 |
included := cats includes:cat. |
|
608 |
included ifFalse:[ |
|
609 |
included := showChangedClasses |
|
610 |
and:[ (changedClasses includes:cls theNonMetaclass) |
|
611 |
or:[(changedClasses includes:cls theMetaclass)] ]. |
|
612 |
included ifFalse:[ |
|
11880 | 613 |
included := showUndocumented |
614 |
and:[ isLoaded |
|
615 |
and:[ cls isPrivate not |
|
616 |
and:[ (cls theMetaclass includesSelector:#documentation) not ]]]. |
|
12043 | 617 |
included ifFalse:[ |
618 |
included := showExtendedClasses |
|
619 |
and:[ cls hasExtensions ]. |
|
620 |
]. |
|
8751 | 621 |
]. |
622 |
]. |
|
623 |
]. |
|
624 |
]. |
|
625 |
included |
|
626 |
]. |
|
5591 | 627 |
]. |
628 |
||
8748 | 629 |
^ Iterator on:[:whatToDo | |
8751 | 630 |
showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ]. |
8734 | 631 |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13193
diff
changeset
|
632 |
environment allClassesDo:[:cls | |
8751 | 633 |
(cls isRealNameSpace) ifFalse:[ |
634 |
(inclusionTest value:cls) ifTrue:[ |
|
635 |
(nameSpaceFilter isNil |
|
636 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
|
637 |
(packageFilter isNil |
|
638 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
|
639 |
whatToDo value:cls |
|
640 |
] |
|
641 |
] |
|
642 |
]. |
|
643 |
]. |
|
644 |
]. |
|
645 |
]. |
|
5591 | 646 |
|
7504 | 647 |
"Created: / 05-02-2000 / 13:42:12 / cg" |
648 |
"Modified: / 10-11-2006 / 17:13:26 / cg" |
|
5591 | 649 |
! ! |
650 |
||
651 |
!ClassCategoryList methodsFor:'private'! |
|
652 |
||
653 |
colorizeCategoryAsChanged:category |
|
654 |
|colorizedCategoryItem categoryList idx| |
|
655 |
||
656 |
colorizedCategoryItem := self colorizeForChangedCode:category copy asText. |
|
657 |
||
658 |
categoryList := self categoryList value. |
|
659 |
idx := categoryList indexOf:category. |
|
660 |
idx ~~ 0 ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
661 |
((categoryList at:idx) sameStringAndEmphasisAs:colorizedCategoryItem) ifFalse:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
662 |
categoryList at:idx put:colorizedCategoryItem. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
663 |
self categoryList changed. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
664 |
] |
5591 | 665 |
]. |
666 |
! |
|
667 |
||
668 |
listOfCategories |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
669 |
|categories categoriesBag hideUnloadedClasses generator nameSpaceFilter packageFilter allName |
7504 | 670 |
categoriesWithExtensions categoriesWithChangedCode categoriesWithRemoteChangedCode |
12043 | 671 |
classesInChangeSet classesInRemoteChangeSet classesWithExtensions |
12487
f36cda6765a9
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12465
diff
changeset
|
672 |
numClassesInChangeSet numClasses numUnloaded numUndocumented numExtendedClasses |
f36cda6765a9
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12465
diff
changeset
|
673 |
pseudoEntryColor showCounts| |
f36cda6765a9
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12465
diff
changeset
|
674 |
|
f36cda6765a9
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12465
diff
changeset
|
675 |
showCounts := true. |
5591 | 676 |
|
677 |
allName := self class nameListEntryForALL. |
|
678 |
||
679 |
hideUnloadedClasses := self hideUnloadedClasses value. |
|
680 |
nameSpaceFilter := self nameSpaceFilter value. |
|
681 |
nameSpaceFilter notNil ifTrue:[ |
|
5950 | 682 |
(nameSpaceFilter includes:allName) ifTrue:[nameSpaceFilter := nil]. |
5591 | 683 |
]. |
684 |
packageFilter := self packageFilter value. |
|
685 |
packageFilter notNil ifTrue:[ |
|
5950 | 686 |
(packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
5591 | 687 |
]. |
688 |
||
12043 | 689 |
numClasses := numUndocumented := numUnloaded := numClassesInChangeSet := numExtendedClasses := 0. |
8734 | 690 |
|
5591 | 691 |
categories := Set new. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
692 |
categoriesBag := Bag new. |
5591 | 693 |
categoriesWithExtensions := Set new. |
694 |
categoriesWithChangedCode := Set new. |
|
7504 | 695 |
categoriesWithRemoteChangedCode := Set new. |
5591 | 696 |
|
6978 | 697 |
classesInChangeSet := ChangeSet current changedClasses. |
698 |
classesInChangeSet := classesInChangeSet collect:[:eachClass | eachClass theNonMetaclass]. |
|
5591 | 699 |
|
7504 | 700 |
classesInRemoteChangeSet := SmallTeam isNil ifTrue:[#()] ifFalse:[ SmallTeam changedClasses ]. |
701 |
classesInRemoteChangeSet := classesInRemoteChangeSet collect:[:each | each theNonMetaclass]. |
|
702 |
||
12043 | 703 |
classesWithExtensions := IdentitySet new. |
704 |
||
5591 | 705 |
classes := IdentitySet new. |
706 |
inGeneratorHolder isNil ifTrue:[ |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13193
diff
changeset
|
707 |
environment allClassesDo:[:cls | |
8751 | 708 |
|cat isLoaded| |
709 |
||
710 |
(cls isRealNameSpace) ifFalse:[ |
|
711 |
(nameSpaceFilter isNil |
|
712 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
|
713 |
(packageFilter isNil |
|
714 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
|
5591 | 715 |
|
8751 | 716 |
isLoaded := cls isLoaded. |
717 |
isLoaded ifTrue:[ |
|
11880 | 718 |
numUnloaded := numUnloaded + 1. |
719 |
cls isPrivate ifFalse:[ |
|
720 |
(cls theMetaclass includesSelector:#documentation) ifFalse:[ |
|
721 |
numUndocumented := numUndocumented + 1. |
|
722 |
]. |
|
8751 | 723 |
]. |
724 |
]. |
|
725 |
||
726 |
(hideUnloadedClasses not or:[isLoaded]) |
|
727 |
ifTrue:[ |
|
8734 | 728 |
numClasses := numClasses + 1. |
729 |
||
6066
dbc820318498
care for nil-category in classes
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
730 |
cat := cls category ? '* no category *'. |
5950 | 731 |
cat isString ifFalse:[self halt:'oops - strange category']. |
732 |
categories add:cat. |
|
733 |
classes add:cls. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
734 |
categoriesBag add:cat. |
5591 | 735 |
|
6978 | 736 |
(classesInChangeSet includes:cls theNonMetaclass) ifTrue:[ |
5950 | 737 |
categoriesWithChangedCode add:cat |
7504 | 738 |
]. |
739 |
(classesInRemoteChangeSet includes:cls theNonMetaclass) ifTrue:[ |
|
740 |
categoriesWithRemoteChangedCode add:cat |
|
741 |
]. |
|
742 |
cls hasExtensions ifTrue:[ |
|
12043 | 743 |
categoriesWithExtensions add:cat. |
744 |
classesWithExtensions add:cls. |
|
745 |
numExtendedClasses := numExtendedClasses + 1. |
|
5950 | 746 |
]. |
747 |
] |
|
748 |
] |
|
749 |
] |
|
750 |
] |
|
751 |
]. |
|
5591 | 752 |
|
5950 | 753 |
"/ those are simulated - in ST/X, empty categories do not |
754 |
"/ really exist; however, during browsing, it makes sense. |
|
755 |
AdditionalEmptyCategories size > 0 ifTrue:[ |
|
756 |
"/ remove those that are present ... |
|
12944
486b9808a1cb
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12718
diff
changeset
|
757 |
AdditionalEmptyCategories := AdditionalEmptyCategories reject:[:cat | (categories includes:cat)]. |
5950 | 758 |
categories addAll:AdditionalEmptyCategories. |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
759 |
categoriesBag addAll:AdditionalEmptyCategories withOccurrences:0. |
5950 | 760 |
]. |
5591 | 761 |
] ifFalse:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
762 |
|setOfCategories| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
763 |
|
5950 | 764 |
generator := inGeneratorHolder value. |
765 |
generator isNil ifTrue:[^ #() ]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
766 |
setOfCategories := Set withAll:generator. |
8345
b2e8f543ec50
being a categoryList with a fixed given list
Claus Gittinger <cg@exept.de>
parents:
7504
diff
changeset
|
767 |
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
|
768 |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13193
diff
changeset
|
769 |
environment allClassesDo:[:each | |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
770 |
|cat| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
771 |
|
11927 | 772 |
each isNameSpace ifFalse:[ |
11900 | 773 |
cat := each category string asSymbol. |
774 |
(setOfCategories includes:cat) ifTrue:[ |
|
775 |
categoriesBag add:cat. |
|
776 |
]. |
|
777 |
] |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
778 |
]. |
5591 | 779 |
]. |
780 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
781 |
pseudoEntryColor := self class pseudoEntryForegroundColor. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
782 |
|
5591 | 783 |
categories := categories asOrderedCollection. |
784 |
||
785 |
categories sort. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
786 |
rawCategoryList := categories. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
787 |
|
5950 | 788 |
categories := |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
789 |
categories collect:[:cat | |
11944 | 790 |
|item isInChangeSet| |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
791 |
|
11944 | 792 |
isInChangeSet := categoriesWithChangedCode includes:cat. |
793 |
isInChangeSet ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
794 |
item := self colorizeForChangedCode:cat copy asText |
5950 | 795 |
] ifFalse:[ |
796 |
(categoriesWithExtensions includes:cat) ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
797 |
item := self colorizeForDifferentPackage:cat copy asText |
5950 | 798 |
"/ cannot add a + here - need separate list for presentation and filter |
6702 | 799 |
"/ cat , (self colorizeForDifferentPackage:self stringForExtensions) |
5950 | 800 |
] ifFalse:[ |
7504 | 801 |
(categoriesWithRemoteChangedCode includes:cat) ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
802 |
item := self colorizeForChangedCodeInSmallTeam:cat copy asText |
7504 | 803 |
] ifFalse:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
804 |
item := cat |
7504 | 805 |
] |
5950 | 806 |
] |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
807 |
]. |
12487
f36cda6765a9
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12465
diff
changeset
|
808 |
showCounts ifTrue:[ |
f36cda6765a9
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12465
diff
changeset
|
809 |
item := item , ((' (%1)' bindWith:(categoriesBag occurrencesOf:cat)) |
f36cda6765a9
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12465
diff
changeset
|
810 |
colorizeAllWith:pseudoEntryColor). |
f36cda6765a9
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12465
diff
changeset
|
811 |
]. |
11944 | 812 |
isInChangeSet ifTrue:[ |
813 |
item := item , self class markForBeingInChangeList |
|
814 |
]. |
|
815 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
816 |
item |
5950 | 817 |
]. |
8734 | 818 |
|
11907 | 819 |
numUndocumented > 0 ifTrue:[ |
820 |
rawCategoryList add:self class nameListEntryForUndocumented. |
|
821 |
categories add:((self class nameListEntryForUndocumentedWithCount bindWith:numUndocumented) allItalic colorizeAllWith:pseudoEntryColor). |
|
8751 | 822 |
]. |
11907 | 823 |
numUnloaded > 0 ifTrue:[ |
824 |
rawCategoryList add:self class nameListEntryForUnloaded. |
|
825 |
categories add:((self class nameListEntryForUnloadedWithCount bindWith:numUnloaded) allItalic colorizeAllWith:pseudoEntryColor). |
|
8751 | 826 |
]. |
12043 | 827 |
numExtendedClasses > 0 ifTrue:[ |
828 |
rawCategoryList add:self class nameListEntryForExtendedClasses. |
|
829 |
categories add:((self class nameListEntryForExtendedClassesWithCount bindWith:numExtendedClasses) allItalic colorizeAllWith:pseudoEntryColor). |
|
830 |
]. |
|
12610 | 831 |
numClassesInChangeSet := (ChangeSet current changedClasses collect:[:c | c theNonMetaclass] as:Set) size. |
8734 | 832 |
numClassesInChangeSet > 0 ifTrue:[ |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
833 |
rawCategoryList addFirst:self class nameListEntryForChanged. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
834 |
categories addFirst:((self class nameListEntryForChangedWithCount bindWith:numClassesInChangeSet) allItalic colorizeAllWith:pseudoEntryColor). |
5591 | 835 |
]. |
8734 | 836 |
|
837 |
categories size > 0 ifTrue:[ |
|
838 |
categories size == 1 ifTrue:[ |
|
839 |
self classCategoryLabelHolder value:(categories first) |
|
840 |
]. |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
841 |
rawCategoryList addFirst:self class nameListEntryForALL. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
842 |
categories addFirst:((self class nameListEntryForALLWithCount bindWith:numClasses) allItalic colorizeAllWith:pseudoEntryColor). |
5591 | 843 |
]. |
8734 | 844 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
845 |
cookedCategoryList := categories. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
846 |
^ rawCategoryList. |
5591 | 847 |
|
6950 | 848 |
"Created: / 05-02-2000 / 13:42:12 / cg" |
11944 | 849 |
"Modified: / 27-10-2012 / 12:34:19 / cg" |
5591 | 850 |
! |
851 |
||
852 |
listView |
|
8741 | 853 |
^ self componentAt:#List |
5591 | 854 |
! |
855 |
||
856 |
makeDependent |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13193
diff
changeset
|
857 |
environment addDependent:self. |
5591 | 858 |
ChangeSet addDependent:self. |
859 |
||
860 |
"Created: / 5.2.2000 / 13:42:13 / cg" |
|
861 |
! |
|
862 |
||
863 |
makeIndependent |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13193
diff
changeset
|
864 |
environment removeDependent:self. |
5591 | 865 |
ChangeSet removeDependent:self. |
866 |
||
867 |
"Created: / 5.2.2000 / 13:42:13 / cg" |
|
868 |
! |
|
869 |
||
870 |
makeItemVisible:item |
|
871 |
|idx listView| |
|
872 |
||
873 |
idx := categoryList value indexOf:item. |
|
874 |
idx ~~ 0 ifTrue:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
875 |
(listView := self listView) notNil ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
876 |
listView makeLineVisible:idx. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
877 |
] |
5591 | 878 |
] |
879 |
! |
|
880 |
||
881 |
makeSelectionOtherThanAllVisible |
|
882 |
|selectedCategories item| |
|
883 |
||
884 |
selectedCategories := self selectedCategoriesStrings. |
|
885 |
"/ the first item after the *all* item |
|
886 |
item := (selectedCategories copy remove:self class nameListEntryForALL; yourself) first. |
|
887 |
self makeItemVisible:item. |
|
888 |
! |
|
889 |
||
890 |
release |
|
891 |
super release. |
|
892 |
||
893 |
categoryList removeDependent:self. |
|
894 |
! |
|
895 |
||
896 |
selectedCategoriesStrings |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
897 |
|selectedCategories stringForExtensions| |
6950 | 898 |
|
899 |
stringForExtensions := self stringForExtensions. |
|
5591 | 900 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
901 |
selectedCategories := self selectedCategories value ? #(). |
6950 | 902 |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
903 |
"/ selectedCategories := selectedCategories |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
904 |
"/ collect:[:each | |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
905 |
"/ |s| |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
906 |
"/ s := each string. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
907 |
"/ (s endsWith:stringForExtensions) ifTrue:[ |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
908 |
"/ s := s copyWithoutLast:(stringForExtensions size). |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
909 |
"/ ]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
910 |
"/ s |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
911 |
"/ ]. |
5591 | 912 |
^ selectedCategories |
6950 | 913 |
|
914 |
"Modified: / 23-08-2006 / 11:38:26 / cg" |
|
5591 | 915 |
! |
916 |
||
6702 | 917 |
stringForExtensions |
918 |
^ ' [ + ]' |
|
919 |
! |
|
920 |
||
5591 | 921 |
updateList |
922 |
|oldList newList oldSelection newSelection prevClasses |
|
923 |
selectedCategoriesHolder| |
|
924 |
||
925 |
selectedCategoriesHolder := self selectedCategories. |
|
926 |
oldSelection := selectedCategoriesHolder value ? #(). |
|
927 |
prevClasses := classes copy. |
|
928 |
||
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
929 |
newList := self listOfCategories. "/ sigh - sideeffect of setting rawList |
5591 | 930 |
oldList := (self categoryList value) ? #(). |
931 |
(newList sameContentsAs:oldList whenComparedWith:[:a :b | a sameStringAndEmphasisAs: b]) |
|
932 |
ifFalse:[ |
|
10580 | 933 |
"/ a real change, or only emphasis ? |
934 |
(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
|
935 |
"/ only emphasis |
10580 | 936 |
oldSelection size > 0 ifTrue:[ |
937 |
selectedCategoriesHolder removeDependent:self. |
|
938 |
selectedCategoriesHolder value:#(). |
|
939 |
selectedCategoriesHolder addDependent:self. |
|
940 |
]. |
|
941 |
categoryList value:newList. |
|
5591 | 942 |
|
10580 | 943 |
oldSelection size > 0 ifTrue:[ |
944 |
newSelection := oldSelection select:[:cat | newList includes:cat]. |
|
945 |
selectedCategoriesHolder value:newSelection. |
|
946 |
] |
|
947 |
] ifFalse:[ |
|
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
948 |
"/ a real change |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
949 |
|
10580 | 950 |
categoryList value:newList. |
951 |
||
952 |
"/ in case the same categories are present, but classes have changed ... |
|
953 |
(prevClasses isNil or:[(classes identicalContentsAs:prevClasses) not]) ifTrue:[ |
|
954 |
self updateOutputGenerator. |
|
955 |
] |
|
956 |
] |
|
5591 | 957 |
] ifTrue:[ |
10580 | 958 |
"/ in case the same categories are present, but classes have changed ... |
959 |
(prevClasses isNil or:[(classes identicalContentsAs:prevClasses) not]) ifTrue:[ |
|
960 |
self updateOutputGenerator. |
|
961 |
] |
|
5591 | 962 |
]. |
963 |
listValid := true. |
|
964 |
||
10580 | 965 |
"Created: / 05-02-2000 / 13:42:13 / cg" |
966 |
"Modified: / 17-08-2011 / 09:52:13 / cg" |
|
5591 | 967 |
! ! |
968 |
||
969 |
!ClassCategoryList methodsFor:'setup'! |
|
970 |
||
5909 | 971 |
commonPostBuild |
5591 | 972 |
|listView| |
973 |
||
974 |
listView := self listView. |
|
975 |
listView notNil ifTrue:[ |
|
5909 | 976 |
listView scrollWhenUpdating:nil |
5591 | 977 |
]. |
5909 | 978 |
super commonPostBuild |
11860
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
979 |
! |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
980 |
|
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
981 |
postBuildCategoryListView:aView |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
982 |
categoryListView := aView. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
983 |
categoryListView visualBlock:[:view :lineNr | cookedCategoryList at:lineNr]. |
7049aeccbf41
show the number of classes per category
Claus Gittinger <cg@exept.de>
parents:
10580
diff
changeset
|
984 |
categoryListView selectedVisualBlock:[:view :lineNr | (cookedCategoryList at:lineNr) string] |
5591 | 985 |
! ! |
986 |
||
987 |
!ClassCategoryList methodsFor:'special'! |
|
988 |
||
989 |
addAdditionalCategory:aCategory |
|
990 |
"/ those are simulated - in ST/X, empty categories do not |
|
991 |
"/ really exist; however, during browsing, it makes sense. |
|
992 |
||
8373 | 993 |
self class addAdditionalCategory:aCategory |
5591 | 994 |
! |
995 |
||
996 |
removeAdditionalCategories:aListOfCategories |
|
8373 | 997 |
self class removeAdditionalCategories:aListOfCategories |
5591 | 998 |
! |
999 |
||
1000 |
removeAllAdditionalCategories |
|
8373 | 1001 |
self class removeAllAdditionalCategories |
8446 | 1002 |
! |
1003 |
||
1004 |
renameAdditionalCategories:oldNames to:newName |
|
1005 |
"/ those are simulated - in ST/X, empty categories do not |
|
1006 |
"/ really exist; however, during browsing, it makes sense. |
|
1007 |
||
1008 |
self class renameAdditionalCategories:oldNames to:newName |
|
5591 | 1009 |
! ! |
1010 |
||
1011 |
!ClassCategoryList class methodsFor:'documentation'! |
|
1012 |
||
1013 |
version |
|
14026
4c197be9097f
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1014 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.51 2014-02-25 10:41:34 vrany Exp $' |
9005 | 1015 |
! |
1016 |
||
1017 |
version_CVS |
|
14026
4c197be9097f
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1018 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.51 2014-02-25 10:41:34 vrany Exp $' |
5591 | 1019 |
! ! |
12465
aed594275d40
class: Tools::ClassCategoryList
Claus Gittinger <cg@exept.de>
parents:
12043
diff
changeset
|
1020 |