'From Squeak3.1alpha [latest update: #''Squeak3.1alpha'' of 28 February 2001 update 3899] on 4 April 2001 at 12:30:04 pm'! "Change Set: classVarInLex-sw Date: 4 April 2001 Author: Scott Wallace Several fixes involving queries regarding class variables in Lexicons, where if the target of the Lexicon were a class object the query results were wrong"! !Lexicon methodsFor: 'category list' stamp: 'sw 4/4/2001 00:25'! selectorsReferringToClassVar "Return a list of methods that refer to given class var that are in the protocol of this object" | aList aClass nonMeta | nonMeta _ targetClass theNonMetaClass. aClass _ nonMeta classThatDefinesClassVariable: currentQueryParameter. aList _ OrderedCollection new. (Smalltalk allCallsOn: (aClass classPool associationAt: currentQueryParameter asSymbol)) do: [:elem | MessageSet parse: elem toClassAndSelector: [:cl :sel | (nonMeta isKindOf: cl) ifTrue: [aList add: sel]]]. ^ aList! ! !Lexicon methodsFor: 'new-window queries' stamp: 'sw 4/4/2001 00:14'! browseClassVarRefs "Let the search pertain to the target class regardless of selection" targetClass theNonMetaClass browseClassVarRefs! ! !Lexicon methodsFor: 'within-tool queries' stamp: 'sw 4/4/2001 00:15'! setLocalClassVarRefs "Put up a list of the class variables in the viewed object, and when the user selects one, let the query results category show all the references to that class variable." | aName | (aName _ targetClass theNonMetaClass chooseClassVarName) ifNil: [^ self]. currentQuery _ #classVarRefs. currentQueryParameter _ aName. self showQueryResultsCategory! !