216 ]. |
216 ]. |
217 "/ self invalidateList. |
217 "/ self invalidateList. |
218 ^ self |
218 ^ self |
219 ]. |
219 ]. |
220 |
220 |
221 changedObject == Smalltalk ifTrue:[ |
221 changedObject == environment ifTrue:[ |
222 something == #newClass ifTrue:[ |
222 something == #newClass ifTrue:[ |
223 listValid == true ifTrue:[ |
223 listValid == true ifTrue:[ |
224 aParameter isNameSpace ifTrue:[ |
224 aParameter isNameSpace ifTrue:[ |
225 (namespaceList value includes:aParameter name) ifFalse:[ |
225 (namespaceList value includes:aParameter name) ifFalse:[ |
226 self invalidateList. |
226 self invalidateList. |
252 |
252 |
253 "Created: / 18.2.2000 / 01:00:14 / cg" |
253 "Created: / 18.2.2000 / 01:00:14 / cg" |
254 ! |
254 ! |
255 |
255 |
256 update:something with:aParameter from:changedObject |
256 update:something with:aParameter from:changedObject |
257 changedObject == Smalltalk ifTrue:[ |
257 changedObject == environment ifTrue:[ |
258 something == #methodDictionary ifTrue:[ |
258 something == #methodDictionary ifTrue:[ |
259 ^ self |
259 ^ self |
260 ]. |
260 ]. |
261 something == #methodTrap ifTrue:[ |
261 something == #methodTrap ifTrue:[ |
262 ^ self |
262 ^ self |
308 nameSpace := NameSpace name:nameSpaceName. |
308 nameSpace := NameSpace name:nameSpaceName. |
309 objects do:[:eachClassToMove | |
309 objects do:[:eachClassToMove | |
310 |className| |
310 |className| |
311 |
311 |
312 className := eachClassToMove nameWithoutPrefix. |
312 className := eachClassToMove nameWithoutPrefix. |
313 nameSpace == Smalltalk ifTrue:[ |
313 nameSpace == environment ifTrue:[ |
314 Smalltalk renameClass:eachClassToMove to:className asSymbol. |
314 environment renameClass:eachClassToMove to:className asSymbol. |
315 ] ifFalse:[ |
315 ] ifFalse:[ |
316 Smalltalk renameClass:eachClassToMove to:(nameSpace name , '::' , className) asSymbol. |
316 environment renameClass:eachClassToMove to:(nameSpace name , '::' , className) asSymbol. |
317 nameSpace changed. |
317 nameSpace changed. |
318 ]. |
318 ]. |
319 ]. |
319 ]. |
320 Smalltalk changed. |
320 environment changed. |
321 ]. |
321 ]. |
322 ^ self |
322 ^ self |
323 ]. |
323 ]. |
324 ! |
324 ! |
325 |
325 |
356 showChangedClasses := spaceNames includes:(self class nameListEntryForChanged). |
356 showChangedClasses := spaceNames includes:(self class nameListEntryForChanged). |
357 |
357 |
358 (showAllClasses or:[spaceNames includes:(self class nameListEntryForALL)]) ifTrue:[ |
358 (showAllClasses or:[spaceNames includes:(self class nameListEntryForALL)]) ifTrue:[ |
359 hideUnloadedClasses ifTrue:[ |
359 hideUnloadedClasses ifTrue:[ |
360 ^ Iterator on:[:whatToDo | |
360 ^ Iterator on:[:whatToDo | |
361 Smalltalk allClassesDo:[:cls | |
361 environment allClassesDo:[:cls | |
362 cls isLoaded ifTrue:[ |
362 cls isLoaded ifTrue:[ |
363 cls isRealNameSpace ifFalse:[ |
363 cls isRealNameSpace ifFalse:[ |
364 whatToDo value:cls |
364 whatToDo value:cls |
365 ] |
365 ] |
366 ] |
366 ] |
367 ] |
367 ] |
368 ] |
368 ] |
369 ]. |
369 ]. |
370 ^ Iterator on:[:whatToDo | |
370 ^ Iterator on:[:whatToDo | |
371 Smalltalk allClassesDo:whatToDo |
371 environment allClassesDo:whatToDo |
372 ] |
372 ] |
373 ]. |
373 ]. |
374 |
374 |
375 (spaceNames size == 1 |
375 (spaceNames size == 1 |
376 and:[spaceNames first = 'Smalltalk']) ifTrue:[ |
376 and:[spaceNames first = 'environment']) ifTrue:[ |
377 "/ somewhat tuned - quick look if classes name includes colons ... |
377 "/ somewhat tuned - quick look if classes name includes colons ... |
378 ^ Iterator on:[:whatToDo | |
378 ^ Iterator on:[:whatToDo | |
379 Smalltalk allClassesDo:[:cls | |
379 environment allClassesDo:[:cls | |
380 |includeIt| |
380 |includeIt| |
381 |
381 |
382 includeIt := (cls name includes:$:) not. |
382 includeIt := (cls name includes:$:) not. |
383 includeIt := includeIt |
383 includeIt := includeIt |
384 or:[(cls isPrivate not |
384 or:[(cls isPrivate not |
385 and:[(cls nameSpace == Smalltalk)])]. |
385 and:[(cls nameSpace == environment)])]. |
386 includeIt := includeIt |
386 includeIt := includeIt |
387 or:[(cls isPrivate |
387 or:[(cls isPrivate |
388 and:[(cls topOwningClass nameSpace == Smalltalk)])]. |
388 and:[(cls topOwningClass nameSpace == environment)])]. |
389 |
389 |
390 includeIt := includeIt |
390 includeIt := includeIt |
391 and:[hideUnloadedClasses not or:[cls isLoaded]]. |
391 and:[hideUnloadedClasses not or:[cls isLoaded]]. |
392 |
392 |
393 includeIt := includeIt |
393 includeIt := includeIt |
413 ^ Iterator on:[:whatToDo | |
413 ^ Iterator on:[:whatToDo | |
414 |changedClasses| |
414 |changedClasses| |
415 |
415 |
416 showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses collect:[:cls | cls theNonMetaclass]]. |
416 showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses collect:[:cls | cls theNonMetaclass]]. |
417 |
417 |
418 Smalltalk allClassesDo:[:cls | |
418 environment allClassesDo:[:cls | |
419 |spaceOfClass spaceNameOfClass includeIt| |
419 |spaceOfClass spaceNameOfClass includeIt| |
420 |
420 |
421 spaceOfClass := cls isPrivate ifTrue:[cls topOwningClass nameSpace] ifFalse:[cls nameSpace]. |
421 spaceOfClass := cls isPrivate ifTrue:[cls topOwningClass nameSpace] ifFalse:[cls nameSpace]. |
422 spaceNameOfClass := spaceOfClass name. |
422 spaceNameOfClass := spaceOfClass name. |
423 |
423 |
468 |
468 |
469 allNamespaces := IdentitySet new. |
469 allNamespaces := IdentitySet new. |
470 |
470 |
471 inGeneratorHolder isNil ifTrue:[ |
471 inGeneratorHolder isNil ifTrue:[ |
472 (self hideUnloadedClasses value) ifTrue:[ |
472 (self hideUnloadedClasses value) ifTrue:[ |
473 Smalltalk allClassesDo:[:eachClass | |
473 environment allClassesDo:[:eachClass | |
474 eachClass isLoaded ifTrue:[ |
474 eachClass isLoaded ifTrue:[ |
475 allNamespaces add:(eachClass theNonMetaclass topNameSpace) |
475 allNamespaces add:(eachClass theNonMetaclass topNameSpace) |
476 ]. |
476 ]. |
477 ] |
477 ] |
478 ] ifFalse:[ |
478 ] ifFalse:[ |
518 "Modified: / 25-02-2000 / 22:11:29 / cg" |
518 "Modified: / 25-02-2000 / 22:11:29 / cg" |
519 "Modified: / 04-12-2011 / 12:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
519 "Modified: / 04-12-2011 / 12:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
520 ! |
520 ! |
521 |
521 |
522 makeDependent |
522 makeDependent |
523 Smalltalk addDependent:self |
523 environment addDependent:self |
524 |
524 |
525 "Created: / 18.2.2000 / 01:04:36 / cg" |
525 "Created: / 18.2.2000 / 01:04:36 / cg" |
526 ! |
526 ! |
527 |
527 |
528 makeIndependent |
528 makeIndependent |
529 Smalltalk removeDependent:self. |
529 environment removeDependent:self. |
530 |
530 |
531 "Created: / 18.2.2000 / 01:04:42 / cg" |
531 "Created: / 18.2.2000 / 01:04:42 / cg" |
532 ! |
532 ! |
533 |
533 |
534 updateList |
534 updateList |
546 self nameSpaceList value:newList. |
546 self nameSpaceList value:newList. |
547 |
547 |
548 oldSelection size > 0 ifTrue:[ |
548 oldSelection size > 0 ifTrue:[ |
549 newSelection := oldSelection select:[:nm | |
549 newSelection := oldSelection select:[:nm | |
550 (nm = self class nameListEntryForALL) |
550 (nm = self class nameListEntryForALL) |
551 or:[ (Smalltalk at:nm asSymbol) isNameSpace] |
551 or:[ (environment at:nm asSymbol) isNameSpace] |
552 ]. |
552 ]. |
553 newSelection ~= oldSelection ifTrue:[ |
553 newSelection ~= oldSelection ifTrue:[ |
554 selectedNamespacesHolder value:newSelection. |
554 selectedNamespacesHolder value:newSelection. |
555 ] |
555 ] |
556 ] |
556 ] |