[Pkg] The Trunk: ST80-cwp.171.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 18 15:46:34 UTC 2014


Colin Putney uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-cwp.171.mcz

==================== Summary ====================

Name: ST80-cwp.171
Author: cwp
Time: 18 January 2014, 10:45:48.504 am
UUID: 4051f45d-b282-4dd5-b412-915239a3560d
Ancestors: ST80-fbs.170

Remove direct references to Undeclared and route through the appropriate environment.

=============== Diff against ST80-fbs.170 ===============

Item was changed:
  ----- Method: ParagraphEditor>>explainClass: (in category 'explain') -----
  explainClass: symbol 
  	"Is symbol a class variable or a pool variable?"
  	| class reply classes |
+ 	self flag: #environments.
  	(model respondsTo: #selectedClassOrMetaClass)
  		ifFalse: [^ nil].
  	(class := model selectedClassOrMetaClass) ifNil: [^ nil].
  	"no class is selected"
  	(class isKindOf: Metaclass)
  		ifTrue: [class := class soleInstance].
  	classes := (Array with: class)
  				, class allSuperclasses.
  	"class variables"
  	reply := classes detect: [:each | (each classVarNames detect: [:name | symbol = name]
  					ifNone: [])
  					~~ nil]
  				ifNone: [].
  	reply == nil ifFalse: [^ '"is a class variable, defined in class ' , reply printString , '"\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , reply printString , ' classPool associationAt: #' , symbol , ').'].
  	"pool variables"
  	classes do: [:each | (each sharedPools
  			detect: [:pool | (pool includesKey: symbol)
  					and: 
  						[reply := pool.
  						true]]
  			ifNone: [])
  			~~ nil].
  	reply
+ 		ifNil: [(class environment isUndeclared: symbol)
- 		ifNil: [(Undeclared includesKey: symbol)
  				ifTrue: [^ '"is an undeclared variable.' , '"\' withCRs , 'SystemNavigation new browseAllCallsOn: (Undeclared associationAt: #' , symbol , ').']]
  		ifNotNil: 
  			[classes := WriteStream on: Array new.
  			self systemNavigation
  				allBehaviorsDo: [:each | (each sharedPools
  						detect: 
  							[:pool | 
  							pool == reply]
  						ifNone: [])
  						~~ nil ifTrue: [classes nextPut: each]].
  			"Perhaps not print whole list of classes if too long. (unlikely)"
  			^ '"is a pool variable from the pool ' , (Smalltalk globals keyAtIdentityValue: reply) asString , ', which is used by the following classes ' , classes contents printString , '"\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , (Smalltalk globals keyAtIdentityValue: reply) asString , ' bindingOf: #' , symbol , ').'].
  	^ nil!



More information about the Packages mailing list