[Pkg] The Trunk: Morphic-cwp.716.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 18 15:43:06 UTC 2014


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

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

Name: Morphic-cwp.716
Author: cwp
Time: 18 January 2014, 10:40:11.628 am
UUID: 0fc19dff-ede8-4bb5-b163-10fa58d0fa3d
Ancestors: Morphic-fbs.715

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

=============== Diff against Morphic-fbs.715 ===============

Item was changed:
  ----- Method: TextEditor>>explainClass: (in category 'explain') -----
  explainClass: symbol 
  	"Is symbol a class variable or a pool variable?"
  	| class reply classes |
  	(model respondsTo: #selectedClassOrMetaClass)
  		ifFalse: [^ nil].
  	(class := model selectedClassOrMetaClass) ifNil: [^ nil].
  	"no class is selected"
  	(class isKindOf: Metaclass)
  		ifTrue: [class := class soleInstance].
  	classes := class withAllSuperclasses.
  	"class variables"
  	reply := classes detect: [:each | each classVarNames anySatisfy: [:name | symbol = name]]
  				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
  			anySatisfy: [:pool | (pool includesKey: symbol)
  					and: 
  						[reply := pool.
  						true]]].
  	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