author | Claus Gittinger <cg@exept.de> |
Tue, 21 Apr 2020 13:54:09 +0200 | |
changeset 19580 | ce40b5d1e941 |
parent 14016 | d4256fb254ee |
permissions | -rw-r--r-- |
5591 | 1 |
" |
2 |
COPYRIGHT (c) 2000 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:#ProjectList |
|
10249 | 17 |
instanceVariableNames:'projectList projectNameList selectionIndexHolder worker |
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
18 |
workerQueue includedPseudoEntryForChanged selectionIndexValid' |
7590 | 19 |
classVariableNames:'AdditionalEmptyProjects HideModules' |
5591 | 20 |
poolDictionaries:'' |
21 |
category:'Interface-Browsers-New' |
|
22 |
! |
|
23 |
||
24 |
!ProjectList class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) 2000 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 |
" |
|
11877 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
I implement the project list in the new system browser |
|
43 |
" |
|
5591 | 44 |
! ! |
45 |
||
46 |
!ProjectList class methodsFor:'interface specs'! |
|
47 |
||
48 |
singleProjectWindowSpec |
|
49 |
"This resource specification was automatically generated |
|
50 |
by the UIPainter of ST/X." |
|
51 |
||
52 |
"Do not manually edit this!! If it is corrupted, |
|
53 |
the UIPainter may not be able to read the specification." |
|
54 |
||
55 |
" |
|
56 |
UIPainter new openOnClass:ClassCategoryList andSelector:#singleCategoryWindowSpec |
|
57 |
ClassCategoryList new openInterface:#singleCategoryWindowSpec |
|
58 |
" |
|
59 |
||
60 |
<resource: #canvas> |
|
61 |
||
62 |
^ |
|
63 |
#(#FullSpec |
|
5592 | 64 |
#name: #singleProjectWindowSpec |
65 |
#window: |
|
5591 | 66 |
#(#WindowSpec |
5592 | 67 |
#label: 'ProjectList' |
68 |
#name: 'ProjectList' |
|
69 |
#min: #(#Point 0 0) |
|
70 |
#max: #(#Point 1024 721) |
|
71 |
#bounds: #(#Rectangle 218 175 518 475) |
|
72 |
) |
|
73 |
#component: |
|
5591 | 74 |
#(#SpecCollection |
5592 | 75 |
#collection: #( |
76 |
#(#LabelSpec |
|
77 |
#label: 'ProjectName' |
|
78 |
#name: 'ProjectLabel' |
|
79 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0) |
|
80 |
#translateLabel: true |
|
81 |
#labelChannel: #projectLabelHolder |
|
82 |
#menu: #menuHolder |
|
83 |
) |
|
84 |
) |
|
5591 | 85 |
|
5592 | 86 |
) |
5591 | 87 |
) |
88 |
! |
|
89 |
||
90 |
windowSpec |
|
91 |
"This resource specification was automatically generated |
|
92 |
by the UIPainter of ST/X." |
|
93 |
||
94 |
"Do not manually edit this!! If it is corrupted, |
|
95 |
the UIPainter may not be able to read the specification." |
|
96 |
||
97 |
" |
|
98 |
UIPainter new openOnClass:ProjectList andSelector:#windowSpec |
|
99 |
ProjectList new openInterface:#windowSpec |
|
100 |
ProjectList open |
|
101 |
" |
|
102 |
||
103 |
<resource: #canvas> |
|
104 |
||
105 |
^ |
|
106 |
#(#FullSpec |
|
6468 | 107 |
#name: #windowSpec |
108 |
#window: |
|
5591 | 109 |
#(#WindowSpec |
6468 | 110 |
#label: 'ProjectList' |
111 |
#name: 'ProjectList' |
|
112 |
#min: #(#Point 0 0) |
|
113 |
#bounds: #(#Rectangle 13 23 313 323) |
|
114 |
) |
|
115 |
#component: |
|
5591 | 116 |
#(#SpecCollection |
6468 | 117 |
#collection: #( |
118 |
#(#SequenceViewSpec |
|
119 |
#name: 'List' |
|
120 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
121 |
#tabable: true |
|
6923 | 122 |
#model: #selectionIndexHolder |
6468 | 123 |
#menu: #menuHolder |
124 |
#hasHorizontalScrollBar: true |
|
125 |
#hasVerticalScrollBar: true |
|
126 |
#miniScrollerHorizontal: true |
|
127 |
#isMultiSelect: true |
|
128 |
#valueChangeSelector: #selectionChangedByClick |
|
6923 | 129 |
#useIndex: true |
130 |
#sequenceList: #projectNameList |
|
6468 | 131 |
#doubleClickChannel: #doubleClickChannel |
132 |
#properties: |
|
133 |
#(#PropertyListDictionary |
|
134 |
#dragArgument: nil |
|
135 |
#dropArgument: nil |
|
136 |
#canDropSelector: #canDropContext: |
|
137 |
#dropSelector: #doDropContext: |
|
138 |
) |
|
139 |
) |
|
140 |
) |
|
5591 | 141 |
|
6468 | 142 |
) |
5591 | 143 |
) |
144 |
||
145 |
"Created: / 17.2.2000 / 23:45:47 / cg" |
|
146 |
"Modified: / 17.2.2000 / 23:47:53 / cg" |
|
147 |
! ! |
|
148 |
||
149 |
!ProjectList class methodsFor:'queries-plugin'! |
|
150 |
||
151 |
aspectSelectors |
|
152 |
^ #( |
|
14016
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
153 |
environmentHolder |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
154 |
#(#doubleClickChannel #action ) |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
155 |
immediateUpdate |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
156 |
selectedProjects |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
157 |
menuHolder |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
158 |
outGeneratorHolder |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
159 |
inGeneratorHolder |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
160 |
selectionChangeCondition |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
161 |
updateTrigger |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
162 |
forceGeneratorTrigger |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
163 |
hideUnloadedClasses |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
164 |
organizerMode |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
165 |
slaveMode |
5591 | 166 |
) |
167 |
||
14016
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
168 |
"Created: / 17-02-2000 / 23:46:18 / cg" |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
169 |
"Modified: / 25-02-2000 / 22:32:10 / cg" |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
170 |
"Modified: / 24-02-2014 / 10:37:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 171 |
! ! |
172 |
||
11915
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
173 |
!ProjectList methodsFor:'accessing'! |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
174 |
|
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
175 |
includedPseudoEntryForChanged:something |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
176 |
includedPseudoEntryForChanged := something. |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
177 |
! ! |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
178 |
|
5591 | 179 |
!ProjectList methodsFor:'aspects'! |
180 |
||
8632 | 181 |
itemList |
182 |
^ self projectList value |
|
183 |
! |
|
184 |
||
5591 | 185 |
projectLabelHolder |
186 |
^ self pseudoListLabelHolder |
|
187 |
! |
|
188 |
||
189 |
projectList |
|
190 |
projectList isNil ifTrue:[ |
|
191 |
projectList := ValueHolder new. |
|
192 |
projectList addDependent:self. |
|
193 |
]. |
|
194 |
^ projectList |
|
195 |
||
196 |
"Created: / 17.2.2000 / 23:39:32 / cg" |
|
197 |
! |
|
198 |
||
6923 | 199 |
projectNameList |
200 |
projectNameList isNil ifTrue:[ |
|
201 |
projectNameList := ValueHolder new. |
|
202 |
"/ projectNameList addDependent:self. |
|
203 |
]. |
|
204 |
^ projectNameList |
|
205 |
||
206 |
"Created: / 17.2.2000 / 23:39:32 / cg" |
|
207 |
! |
|
208 |
||
5591 | 209 |
selectedProjects |
210 |
^ self selectionHolder |
|
211 |
||
212 |
"Created: / 17.2.2000 / 23:39:57 / cg" |
|
213 |
! |
|
214 |
||
215 |
selectedProjects:aValueHolder |
|
216 |
^ self selectionHolder:aValueHolder |
|
6923 | 217 |
! |
218 |
||
219 |
selectionIndexHolder |
|
220 |
selectionIndexHolder isNil ifTrue:[ |
|
221 |
selectionIndexHolder := 0 asValue. |
|
222 |
selectionIndexHolder addDependent:self. |
|
223 |
]. |
|
224 |
^ selectionIndexHolder |
|
225 |
||
226 |
"Created: / 17.2.2000 / 23:39:32 / cg" |
|
5591 | 227 |
! ! |
228 |
||
229 |
!ProjectList methodsFor:'change & update'! |
|
230 |
||
231 |
delayedUpdate:something with:aParameter from:changedObject |
|
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
232 |
|cls sel pkg mthd newSel| |
5591 | 233 |
|
234 |
self inSlaveModeOrInvisible |
|
235 |
"/ (self slaveMode value == true) |
|
236 |
ifTrue:[ |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
237 |
(changedObject == environment |
12519 | 238 |
or:[ something == #projectOrganization ]) ifTrue:[ |
239 |
listValid ifFalse:[ ^ self]. |
|
6923 | 240 |
listValid := false |
241 |
]. |
|
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
242 |
changedObject == self selectionHolder ifTrue:[ |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
243 |
selectionIndexValid := false. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
244 |
]. |
12451 | 245 |
changedObject == inGeneratorHolder ifTrue:[ |
246 |
self invalidateList. |
|
247 |
self updateList. |
|
248 |
]. |
|
249 |
"/ |
|
250 |
"/ self window shown ifFalse:[ ^ self ]. |
|
6923 | 251 |
]. |
252 |
||
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
253 |
(changedObject == self selectionHolder) ifTrue:[ |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
254 |
self updateSelectionIndexFromSelection. |
12532 | 255 |
"/ self enqueueDelayedUpdateOutputGenerator. |
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
256 |
^ self. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
257 |
]. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
258 |
|
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
259 |
selectionIndexValid ifFalse:[ |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
260 |
self updateSelectionIndexFromSelection. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
261 |
]. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
262 |
|
6923 | 263 |
changedObject == self selectionIndexHolder ifTrue:[ |
264 |
listValid ifFalse:[ |
|
265 |
self updateList. |
|
266 |
]. |
|
12451 | 267 |
changedObject value == 0 ifTrue:[ |
268 |
self selectionIndexHolder value:#() |
|
269 |
]. |
|
6923 | 270 |
newSel := changedObject value collect:[:idx | projectList value at:idx]. |
271 |
newSel ~= self selectedProjects value ifTrue:[ |
|
272 |
self selectedProjects value:newSel. |
|
273 |
]. |
|
274 |
^ self. |
|
275 |
]. |
|
5591 | 276 |
|
277 |
changedObject == slaveMode ifTrue:[ |
|
6923 | 278 |
listValid ~~ true ifTrue:[ |
279 |
self enqueueDelayedUpdateList |
|
280 |
]. |
|
281 |
"/ self invalidateList. |
|
282 |
^ self |
|
5591 | 283 |
]. |
284 |
||
6923 | 285 |
changedObject == self projectList ifTrue:[ |
286 |
^ self |
|
287 |
]. |
|
5591 | 288 |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
289 |
changedObject == environment ifTrue:[ |
6923 | 290 |
something == #projectOrganization ifTrue:[ |
291 |
self invalidateList. |
|
12519 | 292 |
slaveMode value == true ifFalse:[ |
293 |
self enqueueDelayedUpdateOutputGenerator. |
|
294 |
]. |
|
6923 | 295 |
^ self. |
296 |
]. |
|
297 |
something == #methodInClass ifTrue:[ |
|
298 |
listValid == true ifTrue:[ |
|
299 |
cls := aParameter at:1. |
|
300 |
sel := aParameter at:2. |
|
301 |
mthd := cls compiledMethodAt:sel. |
|
302 |
mthd notNil ifTrue:[ |
|
303 |
pkg := mthd package. |
|
304 |
(projectList value includes:pkg) ifFalse:[ |
|
305 |
self invalidateList. |
|
306 |
] |
|
307 |
]. |
|
308 |
]. |
|
309 |
^ self |
|
310 |
]. |
|
5591 | 311 |
|
6923 | 312 |
(something == #classDefinition |
313 |
or:[something == #newClass]) ifTrue:[ |
|
314 |
listValid == true ifTrue:[ |
|
315 |
cls := aParameter. |
|
316 |
pkg := cls package. |
|
317 |
(projectList value includes:pkg) ifFalse:[ |
|
318 |
self invalidateList. |
|
319 |
] ifTrue:[ |
|
320 |
self enqueueDelayedUpdateOutputGenerator |
|
321 |
]. |
|
322 |
] ifFalse:[ |
|
323 |
self invalidateList |
|
324 |
]. |
|
325 |
^ self |
|
326 |
]. |
|
327 |
(something == #classRemove) ifTrue:[ |
|
328 |
listValid == true ifTrue:[ |
|
329 |
cls := aParameter. |
|
330 |
pkg := cls package. |
|
331 |
]. |
|
332 |
]. |
|
333 |
^ self |
|
5591 | 334 |
]. |
335 |
||
336 |
"/ something == #projectOrganization ifTrue:[ |
|
337 |
"/ aParameter isSymbol ifTrue:[ |
|
338 |
"/ "/ a single method has changed |
|
339 |
"/"/ sel := aParameter. |
|
340 |
"/"/ mthd := changedObject compiledMethodAt:sel. |
|
341 |
"/ self enqueueDelayedUpdateOutputGenerator. |
|
342 |
"/ ]. |
|
343 |
"/ ^ self |
|
344 |
"/ ]. |
|
345 |
||
6966 | 346 |
changedObject == ChangeSet ifTrue:[ |
347 |
self invalidateList. |
|
348 |
^ self |
|
349 |
]. |
|
350 |
||
5591 | 351 |
(organizerMode notNil |
352 |
and:[organizerMode value ~~ #project]) ifTrue:[ |
|
6923 | 353 |
self invalidateList. |
354 |
^ self |
|
5591 | 355 |
]. |
356 |
super delayedUpdate:something with:aParameter from:changedObject |
|
357 |
||
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
358 |
"Created: / 17-02-2000 / 23:41:02 / cg" |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
359 |
"Modified: / 17-10-2006 / 18:43:40 / cg" |
5591 | 360 |
! |
361 |
||
362 |
selectionChangedByClick |
|
363 |
"we are not interested in that - get another notification |
|
364 |
via the changed valueHolder" |
|
365 |
||
12532 | 366 |
self enqueueDelayedUpdateOutputGenerator. |
367 |
||
5591 | 368 |
"Created: / 17.2.2000 / 23:41:17 / cg" |
369 |
! |
|
370 |
||
371 |
update:something with:aParameter from:changedObject |
|
14016
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
372 |
|
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
373 |
changedObject == environmentHolder ifTrue:[ |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
374 |
self environmentChanged. |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
375 |
^ self. |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
376 |
]. |
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
377 |
|
8730 | 378 |
(self builder isNil or:[self window topView realized not]) ifTrue:[ |
12532 | 379 |
"/ ignore those changes while I am invisible |
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
380 |
"/ self makeIndependent. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
381 |
listValid := false. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
382 |
selectionIndexValid := false. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
383 |
^ self |
8730 | 384 |
]. |
385 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
386 |
changedObject == environment ifTrue:[ |
6923 | 387 |
something == #methodDictionary ifTrue:[ |
388 |
^ self |
|
389 |
]. |
|
390 |
something == #methodTrap ifTrue:[ |
|
391 |
^ self |
|
392 |
]. |
|
10364 | 393 |
something == #methodCoverageInfo ifTrue:[ |
394 |
^ self |
|
395 |
]. |
|
6923 | 396 |
something == #methodInClass ifTrue:[ |
397 |
^ self |
|
398 |
]. |
|
399 |
something == #classVariables ifTrue:[ |
|
400 |
^ self |
|
401 |
]. |
|
402 |
something == #classComment ifTrue:[ |
|
403 |
^ self. |
|
404 |
]. |
|
405 |
something == #methodInClassRemoved ifTrue:[ |
|
406 |
^ self. |
|
407 |
]. |
|
5591 | 408 |
]. |
409 |
super update:something with:aParameter from:changedObject |
|
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
410 |
|
10364 | 411 |
"Modified: / 20-07-2011 / 18:54:39 / cg" |
14016
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
412 |
"Modified: / 25-02-2014 / 10:07:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
413 |
! |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
414 |
|
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
415 |
updateSelectionIndexFromSelection |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
416 |
|newSel allIdx| |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
417 |
|
12439 | 418 |
self selectionHolder value isNil ifTrue:[ |
419 |
self selectionIndexHolder value:0. |
|
420 |
^ self. |
|
421 |
]. |
|
422 |
||
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
423 |
listValid ifFalse:[ |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
424 |
self updateList. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
425 |
]. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
426 |
allIdx := projectList value indexOf:(self class nameListEntryForALL). |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
427 |
|
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
428 |
newSel := self selectionHolder value |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
429 |
collect:[:val | |i| |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
430 |
i := projectList value indexOf:val. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
431 |
i == 0 ifTrue:[allIdx] ifFalse:[i]] |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
432 |
thenSelect:[:idx | idx ~~ 0]. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
433 |
(newSel ~= self selectionIndexHolder value |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
434 |
or:[ self selectionIndexHolder value == 0]) ifTrue:[ |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
435 |
self selectionIndexHolder value:newSel |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
436 |
]. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
437 |
|
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
438 |
selectionIndexValid := true. |
5591 | 439 |
! ! |
440 |
||
441 |
!ProjectList methodsFor:'drag & drop'! |
|
442 |
||
6468 | 443 |
canDropContext:aDropContext |
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
444 |
|objects package| |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
445 |
|
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
446 |
objects := aDropContext dropObjects collect:[:obj | obj theObject]. |
5591 | 447 |
|
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
448 |
(self objectsAreClassFiles:objects) ifTrue:[^ true]. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
449 |
|
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
450 |
(objects conform:[:aMethodOrClass | (aMethodOrClass isMethod or:[aMethodOrClass isClass]) ]) ifFalse:[^ false]. |
5591 | 451 |
|
452 |
package := self packageAtTargetPointOf:aDropContext. |
|
453 |
package isNil ifTrue:[^ false]. |
|
454 |
||
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
455 |
(objects contains:[:aMethodOrClass | aMethodOrClass package ~= package]) ifFalse:[^ false]. |
5591 | 456 |
^ true |
7120 | 457 |
|
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
458 |
"Modified: / 17-10-2006 / 18:30:32 / cg" |
5591 | 459 |
! |
460 |
||
6468 | 461 |
doDropContext:aDropContext |
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
462 |
|package objects methods classes| |
5591 | 463 |
|
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
464 |
objects := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject]. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
465 |
(objects conform:[:something | (something isMethod or:[something isClass])]) ifTrue:[ |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
466 |
methods := objects select:[:something | something isMethod]. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
467 |
classes := objects select:[:something | something isClass]. |
5591 | 468 |
|
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
469 |
package := self packageAtTargetPointOf:aDropContext. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
470 |
package notNil ifTrue:[ |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
471 |
methods notEmpty ifTrue:[ |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
472 |
self masterApplication moveMethods:methods toProject:package. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
473 |
]. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
474 |
classes notEmpty ifTrue:[ |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
475 |
self masterApplication moveClasses:classes toProject:package. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
476 |
] |
6468 | 477 |
]. |
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
478 |
^ self |
5591 | 479 |
]. |
7120 | 480 |
|
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
481 |
(objects conform:[:something | something isFilename]) ifTrue:[ |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
482 |
|p| |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
483 |
|
8966
8387f26335a9
Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents:
8749
diff
changeset
|
484 |
p := (self selectedProjects value ? #()) firstIfEmpty:PackageId noProjectID. |
7423
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
485 |
|
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
486 |
Class packageQuerySignal answer:p |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
487 |
do:[ |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
488 |
self dropClassFiles:objects. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
489 |
]. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
490 |
^ self |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
491 |
]. |
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
492 |
|
e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7338
diff
changeset
|
493 |
"Modified: / 17-10-2006 / 18:34:43 / cg" |
5591 | 494 |
! |
495 |
||
496 |
packageAtTargetPointOf:aDropContext |
|
497 |
|p packageListView lineNr item package dropInfo now |
|
498 |
overItem timeOverItem| |
|
499 |
||
500 |
p := aDropContext targetPoint. |
|
501 |
||
502 |
packageListView := aDropContext targetWidget. |
|
503 |
||
504 |
dropInfo := aDropContext dropInfo. |
|
505 |
||
506 |
lineNr := packageListView yVisibleToLineNr:p y. |
|
507 |
lineNr isNil ifTrue:[^ nil]. |
|
508 |
||
7525
a37f9b951ff6
package at drop-point fix (care for spaces and other decoration)
Claus Gittinger <cg@exept.de>
parents:
7497
diff
changeset
|
509 |
item := projectList value at:lineNr. |
5591 | 510 |
item isNil ifTrue:[^ nil]. |
7325
4e26cc5f9f21
oops - care for old (non-tree) project list handling
Claus Gittinger <cg@exept.de>
parents:
7131
diff
changeset
|
511 |
item isString ifTrue:[^ item asSymbol]. |
5591 | 512 |
|
513 |
item canExpand ifTrue:[ |
|
5782
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
514 |
now := Timestamp now. |
8138 | 515 |
overItem := dropInfo at:#overItem ifAbsentPut:item. |
5782
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
516 |
timeOverItem := dropInfo at:#timeOverItem ifAbsentPut:[now]. |
5591 | 517 |
|
5782
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
518 |
overItem ~~ item ifTrue:[ |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
519 |
dropInfo at:#timeOverItem put:now. |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
520 |
dropInfo at:#overItem put:item. |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
521 |
aDropContext passiveAction:[ self packageAtTargetPointOf:aDropContext ]. |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
522 |
] ifFalse:[ |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
523 |
(now millisecondDeltaFrom:timeOverItem) >= (UserPreferences current timeToAutoExpandItemsWhenDraggingOver) ifTrue:[ |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
524 |
aDropContext saveDraw:[ item expand. packageListView repairDamage ]. |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
525 |
dropInfo removeKey:#timeOverItem. |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
526 |
dropInfo removeKey:#overItem. |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
527 |
] ifFalse:[ |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
528 |
aDropContext passiveAction:[ self packageAtTargetPointOf:aDropContext ]. |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
529 |
] |
ae4720e83b49
Use Timestamp/#asTimestamp instead of AbsoluteTime/#asAbsoluteTime
Stefan Vogel <sv@exept.de>
parents:
5592
diff
changeset
|
530 |
]. |
5591 | 531 |
]. |
532 |
||
533 |
package := item package. |
|
534 |
package = self class nameListEntryForALL ifTrue:[^ nil]. |
|
535 |
^ package. |
|
7325
4e26cc5f9f21
oops - care for old (non-tree) project list handling
Claus Gittinger <cg@exept.de>
parents:
7131
diff
changeset
|
536 |
|
7525
a37f9b951ff6
package at drop-point fix (care for spaces and other decoration)
Claus Gittinger <cg@exept.de>
parents:
7497
diff
changeset
|
537 |
"Modified: / 18-11-2006 / 16:13:47 / cg" |
5591 | 538 |
! ! |
539 |
||
540 |
!ProjectList methodsFor:'generators'! |
|
541 |
||
542 |
makeGenerator |
|
543 |
"return a generator which enumerates the classes from the selected project(s)." |
|
544 |
||
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
545 |
|selectedPackages thePackage hideUnloadedClasses showChangedClasses| |
5591 | 546 |
|
547 |
selectedPackages := self selectedProjects value. |
|
548 |
selectedPackages size == 0 ifTrue:[ |
|
6894 | 549 |
^ #() |
5591 | 550 |
]. |
6907 | 551 |
selectedPackages := selectedPackages collect:[:p | p string withoutSeparators]. |
5591 | 552 |
|
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
553 |
showChangedClasses := selectedPackages includes:(self class nameListEntryForChanged). |
5591 | 554 |
hideUnloadedClasses := self hideUnloadedClasses value. |
555 |
||
556 |
(selectedPackages includes:(self class nameListEntryForALL)) ifTrue:[ |
|
6894 | 557 |
hideUnloadedClasses ifTrue:[ |
558 |
^ Iterator on:[:whatToDo | |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
559 |
environment allClassesDo:[:cls | |
6894 | 560 |
cls isLoaded ifTrue:[ |
9385 | 561 |
cls isRealNameSpace ifFalse:[ |
6894 | 562 |
whatToDo value:cls |
563 |
] |
|
564 |
] |
|
565 |
] |
|
566 |
] |
|
567 |
]. |
|
568 |
^ Iterator on:[:whatToDo | |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
569 |
environment allClassesDo:[:cls | |
9385 | 570 |
cls isRealNameSpace ifFalse:[ |
6894 | 571 |
whatToDo value:cls |
572 |
] |
|
573 |
] |
|
574 |
] |
|
5591 | 575 |
]. |
576 |
||
577 |
selectedPackages size == 1 ifTrue:[ |
|
6894 | 578 |
"/ faster common case |
579 |
thePackage := selectedPackages first. |
|
5591 | 580 |
|
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
581 |
^ Iterator on:[:whatToDo | |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
582 |
|changedClasses| |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
583 |
|
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
584 |
showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ]. |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
585 |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
586 |
environment allClassesDo:[:cls | |
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
587 |
|doInclude| |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
588 |
|
6894 | 589 |
(hideUnloadedClasses not or:[cls isLoaded]) |
590 |
ifTrue:[ |
|
9385 | 591 |
cls isRealNameSpace ifFalse:[ |
6894 | 592 |
doInclude := (thePackage = cls package). |
593 |
doInclude ifFalse:[ |
|
13806 | 594 |
"/ JV@2013-09-17; Why? Java classes can have Smalltalk / Ruby / ... extensions as well!! |
595 |
"/ cls isJavaClass ifFalse:[ |
|
6894 | 596 |
doInclude := (cls methodDictionary contains:[:mthd | thePackage = mthd package]) |
597 |
or:[ cls class methodDictionary contains:[:mthd | thePackage = mthd package]]. |
|
13806 | 598 |
"/ ]. |
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
599 |
doInclude ifFalse:[ |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
600 |
(showChangedClasses and:[ (changedClasses includes:cls theNonMetaclass) |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
601 |
or:[(changedClasses includes:cls theMetaclass)] ]) ifTrue:[ |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
602 |
doInclude := true |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
603 |
]. |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
604 |
]. |
6894 | 605 |
]. |
606 |
doInclude ifTrue:[ |
|
607 |
whatToDo value:cls |
|
608 |
] |
|
609 |
] |
|
610 |
] |
|
611 |
] |
|
612 |
] |
|
5591 | 613 |
]. |
614 |
||
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
615 |
^ Iterator on:[:whatToDo | |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
616 |
|changedClasses| |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
617 |
|
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
618 |
showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ]. |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
619 |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
620 |
environment allClassesDo:[:cls | |
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
621 |
|doInclude| |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
622 |
|
6894 | 623 |
(hideUnloadedClasses not or:[cls isLoaded]) |
624 |
ifTrue:[ |
|
9385 | 625 |
cls isRealNameSpace ifFalse:[ |
6894 | 626 |
doInclude := (selectedPackages includes:cls package). |
627 |
doInclude ifFalse:[ |
|
628 |
cls isJavaClass ifFalse:[ |
|
629 |
doInclude := (cls methodDictionary contains:[:mthd | selectedPackages includes:mthd package]) |
|
630 |
or:[ cls class methodDictionary contains:[:mthd | selectedPackages includes:mthd package]]. |
|
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
631 |
doInclude ifFalse:[ |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
632 |
(showChangedClasses and:[ (changedClasses includes:cls theNonMetaclass) |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
633 |
or:[(changedClasses includes:cls theMetaclass)] ]) ifTrue:[ |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
634 |
doInclude := true |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
635 |
]. |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
636 |
]. |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
637 |
|
6894 | 638 |
] |
639 |
]. |
|
640 |
doInclude ifTrue:[ |
|
641 |
whatToDo value:cls |
|
642 |
] |
|
643 |
] |
|
644 |
] |
|
645 |
] |
|
646 |
] |
|
5591 | 647 |
|
6894 | 648 |
"Created: / 17-02-2000 / 23:49:37 / cg" |
7497 | 649 |
"Modified: / 10-11-2006 / 17:15:15 / cg" |
13806 | 650 |
"Modified: / 17-09-2013 / 10:24:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 651 |
! ! |
652 |
||
11258 | 653 |
!ProjectList methodsFor:'initialize-release'! |
10249 | 654 |
|
12087 | 655 |
commonPostBuild |
656 |
super commonPostBuild. |
|
657 |
listValid ifFalse:[ |
|
658 |
self enqueueDelayedUpdateList. |
|
659 |
]. |
|
660 |
! |
|
661 |
||
662 |
commonPostOpen |
|
663 |
super commonPostOpen. |
|
664 |
listValid ifFalse:[ |
|
665 |
self enqueueDelayedUpdateList. |
|
666 |
]. |
|
667 |
! |
|
668 |
||
10249 | 669 |
initialize |
670 |
||
671 |
super initialize. |
|
11915
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
672 |
workerQueue := SharedQueue new. |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
673 |
includedPseudoEntryForChanged := true. |
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
674 |
selectionIndexValid := false. |
10249 | 675 |
|
676 |
"Created: / 14-12-2010 / 15:41:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11258 | 677 |
! |
678 |
||
679 |
release |
|
680 |
super release. |
|
681 |
||
682 |
projectList removeDependent:self. |
|
10249 | 683 |
! ! |
684 |
||
5591 | 685 |
!ProjectList methodsFor:'private'! |
686 |
||
6923 | 687 |
allShownProjects |
11951 | 688 |
|hideUnloaded allProjects projectBag generator addWithAllParentPackages hideModules| |
7590 | 689 |
|
690 |
hideModules := HideModules ? true. |
|
691 |
hideModules := HideModules ? false. |
|
5591 | 692 |
|
693 |
allProjects := IdentitySet new. |
|
11951 | 694 |
projectBag := Bag new. |
5591 | 695 |
|
696 |
inGeneratorHolder isNil ifTrue:[ |
|
6960 | 697 |
hideUnloaded := self hideUnloadedClasses value. |
698 |
||
699 |
addWithAllParentPackages := |
|
700 |
[:package | |
|
7590 | 701 |
|p parent module| |
5591 | 702 |
|
6960 | 703 |
(allProjects includes:package) ifFalse:[ |
704 |
allProjects add:package. |
|
8966
8387f26335a9
Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents:
8749
diff
changeset
|
705 |
(package ~= PackageId noProjectID |
7889 | 706 |
and:[package ~= #private]) ifTrue:[ |
7552 | 707 |
p := package asPackageId. |
708 |
[(parent := p parentPackage) notNil] whileTrue:[ |
|
709 |
allProjects add:parent asSymbol. |
|
710 |
p := parent. |
|
711 |
]. |
|
7590 | 712 |
hideModules ifFalse:[ |
713 |
(module := p module) notNil ifTrue:[ |
|
714 |
allProjects add:module asSymbol. |
|
715 |
]. |
|
716 |
]. |
|
6655 | 717 |
]. |
6960 | 718 |
]. |
719 |
]. |
|
720 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
721 |
environment allClassesDo:[:eachClass | |
6960 | 722 |
|cls pkg p classPackage| |
723 |
||
9385 | 724 |
eachClass isRealNameSpace ifFalse:[ |
6965 | 725 |
|
726 |
(hideUnloaded not or:[eachClass isLoaded]) ifTrue:[ |
|
727 |
cls := eachClass theNonMetaclass. |
|
728 |
cls isPrivate ifTrue:[ |
|
729 |
cls := cls topOwningClass |
|
730 |
]. |
|
6960 | 731 |
|
8966
8387f26335a9
Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents:
8749
diff
changeset
|
732 |
classPackage := cls package ? (PackageId noProjectID). |
6965 | 733 |
classPackage size > 0 ifTrue:[ |
11951 | 734 |
classPackage := classPackage asSymbol. |
735 |
addWithAllParentPackages value:classPackage. |
|
736 |
projectBag add:classPackage. |
|
6965 | 737 |
] ifFalse:[ |
738 |
"/ for now, nameSpaces are not in any package; |
|
739 |
"/ this might change. Then, 0-sized packages are |
|
740 |
"/ illegal, and the following should be enabled. |
|
741 |
"/ self halt |
|
742 |
]. |
|
11951 | 743 |
|
6965 | 744 |
cls isJavaClass ifFalse:[ |
745 |
cls instAndClassSelectorsAndMethodsDo:[:sel :mthd | |
|
746 |
|mpkg| |
|
747 |
||
748 |
mpkg := mthd package asSymbol. |
|
749 |
mpkg ~~ classPackage ifTrue:[ |
|
750 |
(allProjects includes:mpkg) ifFalse:[ |
|
751 |
addWithAllParentPackages value:mpkg. |
|
752 |
] |
|
753 |
]. |
|
6655 | 754 |
]. |
755 |
]. |
|
756 |
]. |
|
757 |
]. |
|
758 |
]. |
|
6960 | 759 |
allProjects := allProjects asOrderedCollection. |
5591 | 760 |
|
6655 | 761 |
"/ those are simulated - in ST/X, empty projects do not |
762 |
"/ really exist; however, during browsing, it makes sense. |
|
763 |
AdditionalEmptyProjects size > 0 ifTrue:[ |
|
764 |
"/ remove those that are present ... |
|
13806 | 765 |
AdditionalEmptyProjects := AdditionalEmptyProjects select:[:pkg | (allProjects includes:pkg) not]. |
6655 | 766 |
allProjects addAll:AdditionalEmptyProjects. |
767 |
]. |
|
5591 | 768 |
] ifFalse:[ |
6655 | 769 |
generator := inGeneratorHolder value. |
770 |
generator isNil ifTrue:[^ #() ]. |
|
771 |
generator do:[:prj | allProjects add:prj]. |
|
5591 | 772 |
]. |
6923 | 773 |
^ allProjects asOrderedCollection. |
7497 | 774 |
|
7590 | 775 |
"Modified: / 16-01-2007 / 15:56:16 / cg" |
6923 | 776 |
! |
777 |
||
778 |
defaultSlaveModeValue |
|
779 |
|mode| |
|
780 |
||
781 |
mode := self topApplication perform:#initialOrganizerMode ifNotUnderstood:nil. |
|
782 |
mode == OrganizerCanvas organizerModeProject ifTrue:[^ false]. |
|
783 |
mode isNil ifTrue:[^ false]. |
|
784 |
^ true |
|
785 |
! |
|
786 |
||
787 |
initialOrganizerMode |
|
14016
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
788 |
^ OrganizerCanvas organizerModeProject |
6923 | 789 |
! |
790 |
||
791 |
listOfProjects |
|
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
792 |
|allProjects numClassesInChangeSet| |
6923 | 793 |
|
8975
ca2e80f67b74
copy asOrderedCollection -> copyAsOrderedCollection
Claus Gittinger <cg@exept.de>
parents:
8966
diff
changeset
|
794 |
allProjects := self allShownProjects copyAsOrderedCollection. |
11915
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
795 |
allProjects sort. |
5591 | 796 |
|
797 |
allProjects size == 1 ifTrue:[ |
|
6655 | 798 |
"/ self projectLabelHolder value:(allProjects first , ' [Project]'). |
799 |
self projectLabelHolder value:(LabelAndIcon icon:(self class packageIcon) string:allProjects first). |
|
5591 | 800 |
]. |
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
801 |
|
11915
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
802 |
includedPseudoEntryForChanged ifTrue:[ |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
803 |
numClassesInChangeSet := ChangeSet current changedClasses size. |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
804 |
numClassesInChangeSet > 0 ifTrue:[ |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
805 |
"/ don't include count - makeGenerator compares against the un-expanded nameListEntry (sigh - need two lists) |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
806 |
allProjects addFirst:((self class nameListEntryForChanged "bindWith:numClassesInChangeSet") allItalic). |
b070218efdaa
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11877
diff
changeset
|
807 |
]. |
8749
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
808 |
]. |
23db847d3259
added changed to projectList
Claus Gittinger <cg@exept.de>
parents:
8730
diff
changeset
|
809 |
|
5591 | 810 |
allProjects size > 1 ifTrue:[ |
9029
66a3d6c4030e
no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents:
8975
diff
changeset
|
811 |
allProjects addFirst:(self class nameListEntryForALL allItalic). |
5591 | 812 |
]. |
6907 | 813 |
|
5591 | 814 |
^ allProjects |
815 |
||
6907 | 816 |
"Created: / 17-02-2000 / 23:43:05 / cg" |
817 |
"Modified: / 17-08-2006 / 15:08:42 / cg" |
|
5591 | 818 |
! |
819 |
||
820 |
makeDependent |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
821 |
environment addDependent:self. |
6967 | 822 |
ChangeSet addDependent:self. |
5591 | 823 |
! |
824 |
||
825 |
makeIndependent |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
826 |
environment removeDependent:self. |
8220 | 827 |
ChangeSet removeDependent:self. |
5591 | 828 |
! |
829 |
||
13806 | 830 |
markEntry: rawEntry at: index forBeingManagedBySVN: package |
831 |
^ rawEntry. |
|
832 |
||
833 |
(ConfigurableFeatures includesFeature: #SubversionSupportEnabled) ifFalse:[^rawEntry]. |
|
834 |
package = PackageId noProjectID ifTrue:[^rawEntry]. |
|
10249 | 835 |
|
10675
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
836 |
"/ workerQueue |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
837 |
"/ nextPut:[ |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
838 |
"/ | repo newEntry branch mark| |
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
839 |
"/ "/ use environment-at to trick the dependency/prerequisite generator |
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
840 |
"/ repo := (environment at:#SVN::RepositoryManager) current |
10675
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
841 |
"/ repositoryForPackage: package onlyFromCache: false. |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
842 |
"/ repo ifNotNil:[ |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
843 |
"/ mark := ' [SVN]'. |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
844 |
"/ branch := repo workingCopy branchOrNil. |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
845 |
"/ branch ifNotNil:[mark := ' [SVN: ', branch path,']']. |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
846 |
"/ newEntry := rawEntry , (mark asText colorizeAllWith: Color gray). |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
847 |
"/ self projectNameList value at: index put: newEntry. |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
848 |
"/ self projectNameList changed. |
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
849 |
"/ ]]. |
13806 | 850 |
^rawEntry |
10249 | 851 |
|
852 |
"Created: / 14-12-2010 / 15:59:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11138
c37649db3b52
changed: #markEntry:at:forBeingManagedBySVN:
Claus Gittinger <cg@exept.de>
parents:
10675
diff
changeset
|
853 |
"Modified: / 15-01-2012 / 13:17:30 / cg" |
11157
7277655aee35
Use Configurable includesFeature:#Feature instead of direct send of #hasFeature
vrany
parents:
11138
diff
changeset
|
854 |
"Modified: / 19-01-2012 / 10:46:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10249 | 855 |
! |
856 |
||
6923 | 857 |
nameListFor:aProjectList |
858 |
" |
|
859 |
self basicNew |
|
6951 | 860 |
nameListFor:#( |
7060 | 861 |
'exept:expecco' |
862 |
'exept:expecco/application' |
|
863 |
'exept:procware' |
|
864 |
'exept:workflow' |
|
6923 | 865 |
) |
7590 | 866 |
|
867 |
self basicNew |
|
868 |
nameListFor:#( |
|
869 |
'exept' |
|
870 |
'exept:expecco' |
|
871 |
'exept:expecco/application' |
|
872 |
'exept:procware' |
|
873 |
'exept:workflow' |
|
874 |
) |
|
6923 | 875 |
" |
876 |
||
7338 | 877 |
|stack projectsWithExtensions projectsWithChangedCode packagesInChangeSet projectNameList| |
6923 | 878 |
|
879 |
stack := OrderedCollection new. |
|
880 |
||
6951 | 881 |
projectsWithExtensions := Set new. |
882 |
projectsWithChangedCode := Set new. |
|
883 |
||
7338 | 884 |
packagesInChangeSet := ChangeSet current changedPackages. |
6951 | 885 |
|
886 |
projectNameList := OrderedCollection new. |
|
887 |
aProjectList do:[:this | |
|
6923 | 888 |
|thisC entry rawEntry prefix indent| |
889 |
||
6965 | 890 |
this = self class nameListEntryForALL ifTrue:[ |
891 |
entry := this |
|
892 |
] ifFalse:[ |
|
893 |
thisC := this asCollectionOfSubstringsSeparatedByAny:':/'. |
|
894 |
thisC isEmpty ifTrue:[ |
|
8966
8387f26335a9
Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents:
8749
diff
changeset
|
895 |
thisC := Array with:(PackageId noProjectID). |
6965 | 896 |
]. |
6923 | 897 |
|
6965 | 898 |
[ |
899 |
|stackTop| |
|
6923 | 900 |
|
6965 | 901 |
stack notEmpty |
902 |
and:[ |
|
903 |
stackTop := stack last. |
|
904 |
(thisC startsWith:stackTop) ifFalse:[ |
|
905 |
stack removeLast. |
|
906 |
true |
|
907 |
] ifTrue:[ |
|
908 |
false |
|
909 |
]] |
|
910 |
] whileTrue. |
|
911 |
prefix := stack notEmpty ifTrue:[ stack last ] ifFalse:[ #() ]. |
|
912 |
indent := stack size * 4. |
|
913 |
stack addLast:thisC. |
|
914 |
prefix isEmpty ifTrue:[ |
|
6970 | 915 |
rawEntry := thisC first. |
916 |
thisC size > 1 ifTrue:[ |
|
917 |
rawEntry := rawEntry , ':' , ((thisC copyFrom:2) asStringWith:$/). |
|
918 |
] |
|
6965 | 919 |
] ifFalse:[ |
920 |
rawEntry := (thisC copyFrom:prefix size+1) asStringWith:$/. |
|
921 |
]. |
|
922 |
||
7131 | 923 |
(packagesInChangeSet includes:this) ifTrue:[ |
7060 | 924 |
rawEntry := rawEntry , self class markForBeingInChangeList. |
6965 | 925 |
rawEntry := self colorizeForChangedCode:rawEntry. |
926 |
]. |
|
11873
40ed77dbf31e
comment/format in: #nameListFor:
Claus Gittinger <cg@exept.de>
parents:
11258
diff
changeset
|
927 |
|
6965 | 928 |
entry := (String new:indent) , rawEntry. |
11157
7277655aee35
Use Configurable includesFeature:#Feature instead of direct send of #hasFeature
vrany
parents:
11138
diff
changeset
|
929 |
((ConfigurableFeatures includesFeature: #SubversionSupportEnabled) and:[this first ~= $*]) ifTrue:[ |
11873
40ed77dbf31e
comment/format in: #nameListFor:
Claus Gittinger <cg@exept.de>
parents:
11258
diff
changeset
|
930 |
entry := self markEntry: entry at: projectNameList size + 1 forBeingManagedBySVN: this. |
10249 | 931 |
]. |
6923 | 932 |
]. |
6951 | 933 |
projectNameList add:entry. |
6923 | 934 |
]. |
10249 | 935 |
self startWorker. |
6951 | 936 |
^ projectNameList. |
6923 | 937 |
|
938 |
"Created: / 17-02-2000 / 23:43:05 / cg" |
|
10675
1a6a5e0b012f
ask comon feature list if svn is avail
Claus Gittinger <cg@exept.de>
parents:
10364
diff
changeset
|
939 |
"Modified: / 07-09-2011 / 10:45:05 / cg" |
11157
7277655aee35
Use Configurable includesFeature:#Feature instead of direct send of #hasFeature
vrany
parents:
11138
diff
changeset
|
940 |
"Modified: / 19-01-2012 / 10:46:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6923 | 941 |
! |
942 |
||
10249 | 943 |
startWorker |
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
944 |
worker |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
945 |
ifNil:[ |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
946 |
worker := [ |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
947 |
[ workerQueue notEmpty ] whileTrue:[ |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
948 |
|job| |
10249 | 949 |
|
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
950 |
job := workerQueue next. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
951 |
job value |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
952 |
]. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
953 |
worker := nil. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
954 |
] newProcess. |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
955 |
worker resume |
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
956 |
]. |
10249 | 957 |
|
958 |
"Created: / 14-12-2010 / 15:49:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
959 |
"Modified: / 16-12-2010 / 17:35:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
960 |
! |
|
961 |
||
5591 | 962 |
updateList |
6923 | 963 |
|newList oldList newNameList oldNameList oldSelection newSelection selectedProjectsHolder| |
5591 | 964 |
|
965 |
selectedProjectsHolder := self selectedProjects. |
|
966 |
oldSelection := selectedProjectsHolder value. |
|
967 |
newList := self listOfProjects. |
|
6923 | 968 |
oldList := projectList value. |
969 |
newNameList := self nameListFor:newList. |
|
970 |
oldNameList := self projectNameList value. |
|
971 |
(newList ~= oldList |
|
972 |
or:[ newNameList ~= oldNameList]) ifTrue:[ |
|
5591 | 973 |
"/ oldSelection size > 0 ifTrue:[ |
974 |
"/ selectedProjectsHolder removeDependent:self. |
|
975 |
"/ selectedProjectsHolder value:#(). |
|
976 |
"/ selectedProjectsHolder addDependent:self. |
|
977 |
"/ ]. |
|
978 |
||
12442 | 979 |
self projectList value ~= newList ifTrue:[ |
980 |
"Hack to avoid recursion" |
|
981 |
self projectList value:newList. |
|
982 |
]. |
|
6923 | 983 |
listValid := true. |
984 |
self projectNameList value:newNameList. |
|
5591 | 985 |
|
6923 | 986 |
oldSelection size > 0 ifTrue:[ |
987 |
newSelection := oldSelection select:[:prj | newList includes:prj]. |
|
988 |
selectedProjectsHolder value:newSelection. |
|
989 |
] |
|
5591 | 990 |
]. |
991 |
listValid := true. |
|
992 |
||
993 |
"Modified: / 25.2.2000 / 23:10:01 / cg" |
|
994 |
! ! |
|
995 |
||
996 |
!ProjectList methodsFor:'special'! |
|
997 |
||
998 |
addAdditionalProject:aProject |
|
6923 | 999 |
"/ those are simulated - in ST/X, empty projects do not |
5591 | 1000 |
"/ really exist; however, during browsing, it makes sense. |
1001 |
AdditionalEmptyProjects isNil ifTrue:[ |
|
6923 | 1002 |
AdditionalEmptyProjects := Set new. |
5591 | 1003 |
]. |
1004 |
AdditionalEmptyProjects add:aProject. |
|
1005 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
1006 |
environment changed:#projectOrganization "/ not really ... to force update |
5591 | 1007 |
|
1008 |
"Created: / 17.2.2000 / 23:44:27 / cg" |
|
1009 |
! |
|
1010 |
||
1011 |
removeAdditionalProjects:aListOfProjects |
|
1012 |
"/ those are simulated - in ST/X, empty categories do not |
|
1013 |
"/ really exist; however, during browsing, it makes sense. |
|
1014 |
AdditionalEmptyProjects notNil ifTrue:[ |
|
1015 |
aListOfProjects do:[:eachProject | |
|
1016 |
AdditionalEmptyProjects remove:eachProject ifAbsent:nil. |
|
1017 |
]. |
|
1018 |
]. |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12846
diff
changeset
|
1019 |
environment changed:#projectOrganization "/ not really ... to force update |
5591 | 1020 |
|
1021 |
"Created: / 17.2.2000 / 23:45:24 / cg" |
|
1022 |
! ! |
|
1023 |
||
1024 |
!ProjectList class methodsFor:'documentation'! |
|
1025 |
||
11877 | 1026 |
version |
14016
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
1027 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ProjectList.st,v 1.68 2014-02-25 10:40:06 vrany Exp $' |
11877 | 1028 |
! |
1029 |
||
8966
8387f26335a9
Project noPackageId -> PackageId noPackageId
Claus Gittinger <cg@exept.de>
parents:
8749
diff
changeset
|
1030 |
version_CVS |
14016
d4256fb254ee
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13806
diff
changeset
|
1031 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ProjectList.st,v 1.68 2014-02-25 10:40:06 vrany Exp $' |
5591 | 1032 |
! ! |
12394
a4f9d45bb707
fixed selection update from changed class selection,
Claus Gittinger <cg@exept.de>
parents:
12087
diff
changeset
|
1033 |