'From Squeak3.4 of 1 March 2003 [latest update: #5170] on 28 March 2003 at 6:41:45 pm'! "Change Set: KCP-0029-browseClassVar Date: 28 March 2003 Author: stephane ducasse, alexandre bergel, and nathanael schaerli Deprecated ClassDescription>>browseClassVarRefs and define SystemNavigation>>browseClassVarRefs:. Note that all the left senders of browseClassVarRefs are subclasses of StringHolder so they do not have to be modified."! !ClassDescription methodsFor: 'deprecated' stamp: 'sd 3/28/2003 18:22'! browseClassVarRefs self flag: #deprecated. self error: 'Method Deprecated: Use SystemNavigation>>browseClassVarRefs: instead'! ! !StringHolder methodsFor: 'message list menu' stamp: 'sd 3/28/2003 18:25'! browseClassVarRefs "1/17/96 sw: devolve responsibility to the class, so that the code that does the real work can be shared" | cls | cls _ self selectedClass. cls ifNotNil: [SystemNavigation new browseClassVarRefs: cls]! ! !Inspector methodsFor: 'menu commands' stamp: 'sd 3/28/2003 18:29'! classVarRefs "Request a browser of methods that store into a chosen instance variable" | aClass | (aClass _ self classOfSelection) ifNotNil: [SystemNavigation new browseClassVarRefs: aClass]. ! ! !Lexicon methodsFor: 'new-window queries' stamp: 'sd 3/28/2003 18:28'! browseClassVarRefs "Let the search pertain to the target class regardless of selection" SystemNavigation new browseClassVarRefs: targetClass theNonMetaClass ! ! !SystemNavigation methodsFor: 'browse' stamp: 'sd 3/28/2003 18:21'! browseClassVarRefs: aClass "Put up a menu offering all class variable names; if the user chooses one, open up a message-list browser on all methods that refer to the selected class variable" | lines labelStream vars allVars index owningClasses | lines _ OrderedCollection new. allVars _ OrderedCollection new. owningClasses _ OrderedCollection new. labelStream _ WriteStream on: (String new: 200). aClass withAllSuperclasses reverseDo: [:class | vars _ class classVarNames asSortedCollection. vars do: [:var | labelStream nextPutAll: var; cr. allVars add: var. owningClasses add: class]. vars isEmpty ifFalse: [lines add: allVars size]]. labelStream contents isEmpty ifTrue: [^1 beep]. "handle nil superclass better" labelStream skip: -1 "cut last CR". index _ (PopUpMenu labels: labelStream contents lines: lines) startUp. index = 0 ifTrue: [^ self]. aClass environment browseAllCallsOn: ((owningClasses at: index) classPool associationAt: (allVars at: index))! !