The Trunk: Morphic-cwp.716.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-cwp.716.mcz

commits-2
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!