[squeak-dev] The Trunk: Environments-fbs.32.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Jul 30 12:24:13 UTC 2013
Frank Shearar uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-fbs.32.mcz
==================== Summary ====================
Name: Environments-fbs.32
Author: fbs
Time: 30 July 2013, 1:23:32.538 pm
UUID: 66b0a9de-4e9e-479b-a248-27363dae4c7d
Ancestors: Environments-fbs.31
Copy SystemDictionary >> #poolUsers to Environment so that `Smalltalk poolUsers` works once more.
=============== Diff against Environments-fbs.31 ===============
Item was added:
+ ----- Method: Environment>>poolUsers (in category 'as yet unclassified') -----
+ poolUsers
+ "Answer a dictionary of pool name -> classes that refer to it.
+ Also includes any globally know dictionaries (such as
+ Smalltalk, Undeclared etc) which although not strictly
+ accurate is potentially useful information"
+ "Smalltalk poolUsers"
+ | poolUsers |
+ poolUsers := Dictionary new.
+ self keys
+ do: [:k | "yes, using isKindOf: is tacky but for reflective code like
+ this it is very useful. If you really object you can:-
+ a) go boil your head.
+ b) provide a better answer.
+ your choice."
+ | pool refs |
+ (((pool := self at: k) isKindOf: Dictionary)
+ or: [pool isKindOf: SharedPool class])
+ ifTrue: [refs := (self systemNavigation allClasses
+ select: [:c | c sharedPools identityIncludes: pool]
+ thenCollect: [:c | c name]) asOrderedCollection.
+ refs
+ add: (self systemNavigation
+ allCallsOn: (self associationAt: k)).
+ poolUsers at: k put: refs]].
+ ^ poolUsers!
More information about the Squeak-dev
mailing list
|