| package | package := Package name: 'CJDWorkspaceLookUp'. package paxVersion: 0; basicComment: 'Release 0.0.3 Alpha (4-09-2003) By: Christopher J. Demers Copyright 2002, 2003 (Freeware) The code may be freely used and freely modified, but please don''t redistributed modified versions (without asking me). Use this code at your own risk. see: http://www.mitchellscientific.com/smalltalk/ for much more information. This package adds a context completion tool to most development workspaces. Place the cursor where you want to insert code and press -.(dot). If it can guess what you are trying to do based on the context it will offer some choices in a list box. It has limits, but can also make some good guesses in certain contexts. I intend to continue to make it even smarter. Please see the web site for a much more comprehensive explanation of its capabilities. DIRECTIONS: The hot key/menu item -.(dot) must be added be added via: CJDLookupContext addMenuItems. it can be removed via CJDLookupContext removeMenuItems. or uninstalling the class.'. package basicPackageVersion: '0.003'. package classNames add: #CJDAttributeLookUp; add: #CJDLookupContext; yourself. package methodNames add: #ClassBrowserAbstract -> #cjdWorkspaceLookup; add: #Debugger -> #cjdWorkspaceLookup; add: #SmalltalkWorkspace -> #cjdLookup; add: #SmalltalkWorkspaceDocument -> #cjdWorkspaceLookup; yourself. package binaryGlobalNames: (Set new yourself). package globalAliases: (Set new yourself). package allResourceNames: (Set new add: #CJDAttributeLookUp -> 'Class view'; add: #CJDAttributeLookUp -> 'InstanceVariable view'; add: #CJDAttributeLookUp -> 'Method view'; yourself). package setPrerequisites: (IdentitySet new add: '..\Object Arts\Dolphin\IDE\Base\Development System'; add: '..\Object Arts\Dolphin\Base\Dolphin'; add: '..\Object Arts\Dolphin\MVP\Views\Common Controls\Dolphin Common Controls'; add: '..\Object Arts\Dolphin\MVP\Base\Dolphin MVP Base'; add: '..\Object Arts\Dolphin\MVP\Type Converters\Dolphin Type Converters'; add: '..\Object Arts\Dolphin\MVP\Models\Value\Dolphin Value Models'; add: '..\Object Arts\Dolphin\System\Compiler\Smalltalk Parser'; add: '..\Object Arts\Dolphin\IDE\Standard Edition\Standard Edition Tools'; yourself). package! "Class Definitions"! Object subclass: #CJDLookupContext instanceVariableNames: 'workspacePresenter currentClass currentObject isSpaceNeeded words' classVariableNames: '' poolDictionaries: '' classInstanceVariableNames: ''! ValueDialog subclass: #CJDAttributeLookUp instanceVariableNames: 'listPresenter methodFilterPresenter classFilterPresenter aspectChkbPresenter choices isFullFilterNeeded' classVariableNames: '' poolDictionaries: '' classInstanceVariableNames: ''! "Global Aliases"! "Loose Methods"! !ClassBrowserAbstract methodsFor! cjdWorkspaceLookup "cdemers - 5/9/2002" | cardView | cardView := view viewNamed: 'cards'. ^(CJDLookupContext on: cardView currentCard referee presenter) evaluate: self actualClass. ! ! !ClassBrowserAbstract categoriesFor: #cjdWorkspaceLookup!*-unreferenced selectors!public! ! !Debugger methodsFor! cjdWorkspaceLookup "CJD 9-4-2001" ^(CJDLookupContext on: sourcePresenter ) evaluate.! ! !Debugger categoriesFor: #cjdWorkspaceLookup!*-unreferenced selectors!public! ! !SmalltalkWorkspace methodsFor! cjdLookup "CJD 9-4-2001" ^(CJDLookupContext on: self) evaluate! ! !SmalltalkWorkspace categoriesFor: #cjdLookup!*-unreferenced selectors!public! ! !SmalltalkWorkspaceDocument methodsFor! cjdWorkspaceLookup "cdemers - 5/9/2002" ^(CJDLookupContext on: workspacePresenter) evaluate.! ! !SmalltalkWorkspaceDocument categoriesFor: #cjdWorkspaceLookup!*-unreferenced selectors!public! ! "End of package definition"! "Source Globals"! "Classes"! CJDLookupContext guid: (GUID fromString: '{1698DAB6-7BFE-4BF6-8D58-4F11479D9812}')! CJDLookupContext comment: ''! !CJDLookupContext categoriesForClass!Unclassified! ! !CJDLookupContext methodsFor! argumentAndTempVariableNames "cdemers - 4/9/2003 Return a collection of argument and temporary variable names if available." | methodText methodNode varNameCol | varNameCol := OrderedCollection new. methodText := workspacePresenter view plainText. methodNode := [SmalltalkParser parseMethod: methodText ] on: SmalltalkCompilerError do: [:firstError | firstError return: ([SmalltalkParser parseMethod: (methodText copyFrom: 1 to: firstError range start -1)] on: Error do: [:secondError | secondError return: nil])]. methodNode isNil ifTrue: [^ varNameCol]. varNameCol addAll: (methodNode arguments collect: [:each | each name]). varNameCol addAll: (methodNode body temporaries collect: [:each | each name]). ^varNameCol ! evaluate "CJD 8-26-2001 Do whatever lookup can be done based on the context." ^self evaluate: nil! evaluate: suggestedClass "CJD 8-26-2001 Do whatever lookup can be done based on the context." | range str choice lValue additionalVariableNames | workspacePresenter view hasFocus ifFalse: [^nil]. (workspacePresenter evaluationContext isKindOf: Class) ifTrue: [currentClass := workspacePresenter evaluationContext] ifFalse: [currentObject := workspacePresenter evaluationContext. currentClass := currentObject class]. suggestedClass notNil ifTrue: [currentClass := suggestedClass]. workspacePresenter selection isEmpty ifTrue: [range := workspacePresenter view lineRange: workspacePresenter view currentLine. str := range isEmpty ifTrue: [''] ifFalse: [workspacePresenter view plainTextFrom: range first to: workspacePresenter view caretPosition - 1]] ifFalse: [str := workspacePresenter selection]. isSpaceNeeded := str notEmpty and: [str last isSeparator not]. words := str trimBlanks subStrings. lValue := words isEmpty ifTrue: [''] ifFalse: [words last]. "It may be a wild carded class refference." (workspacePresenter selection notEmpty and: [lValue includes: $*]) ifTrue: [choice := CJDAttributeLookUp chooseClassFor: lValue. ^choice notNil ifTrue: [workspacePresenter replaceSelection: choice]]. "No text, or message wanting argument, so choose an instance variable." choice := (lValue isEmpty or: [':.+-=/\*|&^%$#@!![<>(,' includes: lValue last]) ifTrue: [additionalVariableNames := self argumentAndTempVariableNames. additionalVariableNames addAll: #('self' 'super'). additionalVariableNames addAll: workspacePresenter workspacePool keys. choice := CJDAttributeLookUp chooseVariableFor: currentClass with: additionalVariableNames asSet. ^choice notNil ifTrue: [self insertCode: choice]]. "If it is a block closure." lValue last = $] ifTrue: [choice := CJDAttributeLookUp chooseMethodFor: BlockClosure. ^choice notNil ifTrue: [self insertCode: choice]]. "cdemers - 4/9/2003 If it is a String." lValue last = $' ifTrue: [choice := CJDAttributeLookUp chooseMethodFor: String. ^choice notNil ifTrue: [self insertCode: choice]]. "cdemers - 4/9/2003 If it is a Number." lValue last isDigit ifTrue: [choice := CJDAttributeLookUp chooseMethodFor: ([(Number fromString: lValue) class] on: Error do: [:err | err return: nil]). choice notNil ifTrue: [^self insertCode: choice]]. "If we can get it out of the workspacePool then use that." (workspacePresenter workspacePool includesKey: lValue) ifTrue: [choice := CJDAttributeLookUp chooseMethodFor: (workspacePresenter workspacePool at: lValue) class. ^choice notNil ifTrue: [self insertCode: choice]]. "Comment ID and TimeStamp." lValue = '"' ifTrue: [^workspacePresenter replaceSelection: SessionManager current userName , ' - ' , Date new displayString]. "If we are a live instance, like in a debugger" currentObject notNil ifTrue: [choice := CJDAttributeLookUp chooseMethodFor: (CJDAttributeLookUp valueOfInstanceVariable: lValue of: currentObject) class. ^choice notNil ifTrue: [self insertCode: choice]] ifFalse: [choice := self lookUp: lValue. ^choice notNil ifTrue: [self insertCode: choice]]! guessModelClassFor: aClass "CJD 8-26-2001 Try to determin the class for the model of aClass." | literal lastClass method | method := aClass class methodDictionary at: #defaultModel ifAbsent: [^nil]. 1 to: method size do: [:index | literal := method at: index. (literal isKindOf: Association) ifTrue: [literal := literal key]. (Smalltalk includesKey: literal) ifTrue: [lastClass := Smalltalk at: literal]]. ^lastClass. ! insertCode: aString "cdemers - 5/9/2002 Insert aString into the workspace providing a prefixed space if needed." ^workspacePresenter replaceSelection: (isSpaceNeeded ifTrue: [ ' '] ifFalse: ['']) , aString.! lookUp: anLValue "CJD 8-26-2001 Try to do a look up for anLValue (a one word string on the left side of the cursor) in the context for currentClass. This will handle refferences to self, it will try to handle model via a defaultModel class side method if there is one, and it will handle classes. It will also try to handle instance variable names by looking up definitons in a ReStore style class deffinition method. Future expansion could provide a facility for picking a class for an ivar and caching that for future refference." | possableClass choice lValue | lValue := anLValue select: [:char | char isAlphaNumeric]. (lValue = 'self' or: [lValue = 'super']) ifTrue: [^CJDAttributeLookUp chooseMethodFor: currentClass]. (lValue = 'class' and: [(words at: words size - 1) = 'self']) ifTrue: [^CJDAttributeLookUp chooseMethodFor: currentClass class]. lValue = 'model' ifTrue: [possableClass := self guessModelClassFor: currentClass. possableClass isNil "ifTrue: [MessageBox notify: 'Can not determin model class.'. ^nil]." ifFalse: [^CJDAttributeLookUp chooseMethodFor: possableClass]]. "If it is a class" (Smalltalk includesKey: lValue asSymbol) ifTrue: [^CJDAttributeLookUp chooseMethodFor: (Smalltalk at: lValue asSymbol) class]. "See if it might be a presenter, and see if we can extract its class from #createPresenters." (currentClass includesBehavior: Presenter) ifTrue: [possableClass := self queryCreateComponentsFor: anLValue. possableClass isNil ifFalse: [^CJDAttributeLookUp chooseMethodFor: possableClass]]. "cdemers - 7/17/2002 Added to allow a choice from all selectors in the image if we can not dtermin the type" ^CJDAttributeLookUp chooseMethodFor: Smalltalk allBehaviors. "If it has not been handled yet attempt to determind type via a ReStore class deffinition method if there is one." "MessageBox notify: 'Can not determin ' , anLValue , '''s class.'. ^nil." ! queryCreateComponentsFor: anLValue "cdemers - 5/9/2002 Return a possible class for anLValue based on the createComponents method if there is one. This is VERY primative parsing. If there are extra spaces then it will not find the class. At some point in the future I might see if the Refactoring Browser parser could be used here. " | method sourceStrm answer | method := currentClass methodDictionary at: #createComponents ifAbsent: [^nil]. sourceStrm := ReadStream on: method getSource. (sourceStrm skipToAll: anLValue , ' := self add: ') ifTrue: [answer := (sourceStrm upTo: $ ) asSymbol] ifFalse: [^nil]. ^(Smalltalk includesKey: answer ) ifTrue: [Smalltalk at: answer] ! workspacePresenter ^workspacePresenter! workspacePresenter: anObject workspacePresenter := anObject! ! !CJDLookupContext categoriesFor: #argumentAndTempVariableNames!private! ! !CJDLookupContext categoriesFor: #evaluate!public! ! !CJDLookupContext categoriesFor: #evaluate:!public! ! !CJDLookupContext categoriesFor: #guessModelClassFor:!public! ! !CJDLookupContext categoriesFor: #insertCode:!public! ! !CJDLookupContext categoriesFor: #lookUp:!public! ! !CJDLookupContext categoriesFor: #queryCreateComponentsFor:!public! ! !CJDLookupContext categoriesFor: #workspacePresenter!*-unreferenced selectors!accessing!private! ! !CJDLookupContext categoriesFor: #workspacePresenter:!accessing!private! ! !CJDLookupContext class methodsFor! addMenuItems "cdemers - 6/12/2002 Register events that will cause menu items to be added to the development GUI. ex: self addMenuItems " self browsersToExtend do: [:each | each when: #viewOpened: send: #onBrowserOpened: to: self]. self othersToExtend do: [:each | each when: #viewOpened: send: #onOtherOpened: to: self] ! browsersToExtend "cdemers - 4/9/2003 Ehanced to also extend any subclasses of the browsers (needed for Tools+)." | browsers | browsers := OrderedCollection with: ClassBrowserShell with: SystemBrowserShell with: SmalltalkWorkspaceDocument with: Debugger. browsers addAll: Debugger subclasses. browsers addAll: SystemBrowserShell subclasses. ^browsers.! extendBrowser: presenterToExtend "cdemers - 5/8/2002 " | workspaceMenu cmd | cmd := CommandMenuItem command: #cjdWorkspaceLookup description: 'Context Lookup'. cmd acceleratorKey: 4286. "Ctrl+." "(presenterToExtend isKindOf: Debugger) ifTrue: [self shiftHalt]." workspaceMenu := (presenterToExtend view menuBar find: 'Workspace'). "workspaceMenu insertItem: cmd after: (workspaceMenu find: 'Debug It F11') command." workspaceMenu addSeparator; addItem: cmd. cmd registerAcceleratorKeyIn: presenterToExtend view combinedAcceleratorTable. cmd := ClosedCommandDescription command: #cjdLookup description: 'Context Lookup' receiver: presenterToExtend. presenterToExtend allSubPresentersDo: [:eachPresenter | (eachPresenter isKindOf: SmalltalkWorkspace) ifTrue: [workspaceMenu := eachPresenter view contextMenu. cmd receiver: eachPresenter. workspaceMenu addSeparator; addCommandDescription: cmd copy]]! extendOther: presenterToExtend "cdemers - 5/8/2002 " | workspaceMenu cmd | cmd := CommandMenuItem command: #cjdLookup description: 'Context Lookup'. cmd acceleratorKey: 4286. "Ctrl+." workspaceMenu := (presenterToExtend view menuBar find: 'Workspace'). "workspaceMenu insertItem: cmd after: (workspaceMenu find: 'Debug It F11') command." workspaceMenu addSeparator; addItem: cmd. cmd registerAcceleratorKeyIn: presenterToExtend view combinedAcceleratorTable. cmd := ClosedCommandDescription command: #cjdLookup description: 'Context Lookup' receiver: presenterToExtend. presenterToExtend allSubPresentersDo: [:eachPresenter | (eachPresenter isKindOf: SmalltalkWorkspace) ifTrue: [workspaceMenu := eachPresenter view contextMenu. cmd receiver: eachPresenter. workspaceMenu addSeparator; addCommandDescription: cmd copy]]! on: aWorkspacePresenter "cdemers - 5/9/2002" ^self new workspacePresenter: aWorkspacePresenter; yourself.! onBrowserOpened: aClassBrowserAbstract "cdemers - 5/9/2002" self extendBrowser: aClassBrowserAbstract. ! onOtherOpened: aClassBrowserAbstract "cdemers - 5/9/2002" self extendOther: aClassBrowserAbstract. ! othersToExtend "cdemers - 4/9/2003 Improved support for add-on tools." | others | others := OrderedCollection with: InspectorShell with: FlipperInspector with: MethodBrowserShell with: PackageBrowserShell with: ViewComposer. others addAll: MethodBrowserShell subclasses; addAll: ViewComposer subclasses. ^others. ! removeMenuItems "cdemers - 6/12/2002 Remove events that would add menu items to the development UI. self removeMenuItems " self browsersToExtend do: [:each | each removeEventsTriggeredFor: self]. self othersToExtend do: [:each | each removeEventsTriggeredFor: self] ! testClassSide ! uninitialize "Private - cdemers - 6/12/2002 Make sure events are unregistered. self uninitialize " self removeMenuItems! ! !CJDLookupContext class categoriesFor: #addMenuItems!*-unreferenced selectors!dolphinExtensions!initializing!public! ! !CJDLookupContext class categoriesFor: #browsersToExtend!constants!dolphinExtensions!private! ! !CJDLookupContext class categoriesFor: #extendBrowser:!dolphinExtensions!event handling!private! ! !CJDLookupContext class categoriesFor: #extendOther:!dolphinExtensions!event handling!private! ! !CJDLookupContext class categoriesFor: #on:!public! ! !CJDLookupContext class categoriesFor: #onBrowserOpened:!dolphinExtensions!event handling!private! ! !CJDLookupContext class categoriesFor: #onOtherOpened:!dolphinExtensions!event handling!private! ! !CJDLookupContext class categoriesFor: #othersToExtend!constants!dolphinExtensions!private! ! !CJDLookupContext class categoriesFor: #removeMenuItems!dolphinExtensions!initializing!public! ! !CJDLookupContext class categoriesFor: #testClassSide!*-unreferenced selectors!public! ! !CJDLookupContext class categoriesFor: #uninitialize!dolphinExtensions!initializing!private! ! CJDAttributeLookUp guid: (GUID fromString: '{2F7F3521-810F-43CC-B781-0438CFDC7966}')! CJDAttributeLookUp comment: ''! !CJDAttributeLookUp categoriesForClass!Unclassified! ! !CJDAttributeLookUp methodsFor! choices: aSequenceableCollection "Private - Sets the choices to be aSequenceableCollection" isFullFilterNeeded := true. choices := aSequenceableCollection. listPresenter list: aSequenceableCollection.! createComponents "Create the presenters contained by the receiver" super createComponents. listPresenter := self add: ListPresenter new name: 'choices'. methodFilterPresenter := self add: TextPresenter new name: 'methodFilterTB'. classFilterPresenter := self add: TextPresenter new name: 'classFilterTB'. aspectChkbPresenter := self add: BooleanPresenter new name: 'aspectChkb'. ! createSchematicWiring "Create the trigger wiring for the receiver" super createSchematicWiring. listPresenter when: #actionPerformed send: #ok to: self. listPresenter when: #selectionChanged send: #onSelectionChanged to: self. "methodFilterPresenter when: #focusLost send: #onFilterMethods to: self." "methodFilterPresenter when: #keyTyped: send: #onFilterMethods to: self." "methodFilterPresenter when: #keyReleased: send: #onFilter to: self." "classFilterPresenter when: #keyReleased: send: #onFilter to: self." methodFilterPresenter model when: #valueChanged send: #onFilter to: self. classFilterPresenter model when: #valueChanged send: #onFilter to: self. methodFilterPresenter when: #keyPressed: send: #onFilterKeyPressed: to: self. classFilterPresenter when: #keyPressed: send: #onFilterKeyPressed: to: self. ! onFilter "cdemers - 9/24/2001 Filter." "cdemers - 7/29/2002 I have tried to improve the speed (it is only an issue when it displays all selectors) by using isFullFilterNeeded and getting some silliness out of the loops." "cdemers - 8/1/2002 beginsWith: is faster in cases where the user is not also using wild card characters, however I still support wildcards by falling back on match:." "SpeedTest: col := (1 to: 10000) collect: [:each | each displayString] [col select: [:each | each beginsWith: '1000']] millisecondsToRepeat: 100 8851 [col select: [:each | each match: '1000*']] millisecondsToRepeat: 100 23719" | newCol tmpStr testMethod | newCol := isFullFilterNeeded ifTrue: [choices] ifFalse: [listPresenter list]. isFullFilterNeeded := false. tmpStr := classFilterPresenter value. tmpStr notEmpty ifTrue:[newCol := (tmpStr includes: $*) ifTrue: [tmpStr := tmpStr , '*'. newCol select: [:each | tmpStr match: each methodClass printString]] ifFalse: [newCol select: [:each | each methodClass printString beginsWith: tmpStr]]]. tmpStr := methodFilterPresenter value. tmpStr notEmpty ifTrue:[newCol := (tmpStr includes: $*) ifTrue: [tmpStr := tmpStr , '*'. newCol select: [:each | tmpStr match: each selector]] ifFalse: [newCol select: [:each | each selector beginsWith: tmpStr]]]. listPresenter list: newCol.! onFilterKeyPressed: aKeyEvent "cdemers - 5/9/2002" "cdemers - 8/1/2002 Revised to provide some intelligence about how large of a filter we must to. Sometimes we can shotcut to a filter of the previous collection." aKeyEvent scanCode = 80 "Down arrow" ifTrue: [ listPresenter setFocus. ^listPresenter selectionByIndex: (1 min: listPresenter model size)]. (aKeyEvent scanCode = 83 or: [aKeyEvent scanCode = 14]) "Delete or Backspace" ifTrue: [^isFullFilterNeeded := true.]. classFilterPresenter view hasFocus ifTrue: [classFilterPresenter view caretPosition > (classFilterPresenter view text size ) ifFalse: [ ^isFullFilterNeeded := true]]. methodFilterPresenter view hasFocus ifTrue: [methodFilterPresenter view caretPosition = (methodFilterPresenter view text size) ifFalse: [^isFullFilterNeeded := true]] ! onSelectionChanged self value: (listPresenter selectionIfNone: [nil]).! testDebug | temp | temp := 'Temp String'. " *C* " listPresenter . aspectChkbPresenter . self halt.! useAspectValue "cdemers - 5/9/2002 Should we add aspectValue: to the return string." ^aspectChkbPresenter value ! ! !CJDAttributeLookUp categoriesFor: #choices:!accessing!private! ! !CJDAttributeLookUp categoriesFor: #createComponents!initializing!public! ! !CJDAttributeLookUp categoriesFor: #createSchematicWiring!initializing!public! ! !CJDAttributeLookUp categoriesFor: #onFilter!public! ! !CJDAttributeLookUp categoriesFor: #onFilterKeyPressed:!public! ! !CJDAttributeLookUp categoriesFor: #onSelectionChanged!public! ! !CJDAttributeLookUp categoriesFor: #testDebug!*-unreferenced selectors!public! ! !CJDAttributeLookUp categoriesFor: #useAspectValue!public! ! !CJDAttributeLookUp class methodsFor! chooseClassFor: aClassPattern "CJD 9-5-2001 Choose a class for aClassPattern." | choices | aClassPattern isNil ifTrue: [^nil]. choices := Smalltalk keys select: [:aSymbol | ((Smalltalk at: aSymbol) isKindOf: Class) and: [(aClassPattern match: aSymbol asString)]]. ^(self create: 'Class view' on: nil asValue choices: choices asSortedCollection caption: 'Select a Class') showModal! chooseMethodFor: aClassOrCollection "CJD 8-26-2001 Choose a method for aClass including all super classes except Object." "cdemers - 7/17/2002 Updated to also accept a collection of classes." | classes choices choice presenter | aClassOrCollection isNil ifTrue: [^nil]. choices := OrderedCollection new. (aClassOrCollection isKindOf: Collection) ifTrue: [classes := aClassOrCollection] ifFalse: [classes := aClassOrCollection withAllSuperclasses]. classes remove: Object ifAbsent: [nil]. classes do: [:each | choices addAll: each methodDictionary values]. presenter := self create: 'Method view' on: nil asValue choices: choices caption: 'Select a method'. choice := presenter showModal. ^choice notNil ifTrue: [ presenter useAspectValue ifTrue: ['aspectValue: #' , choice selector displayString] ifFalse: [choice selector]].! chooseVariableFor: aClass with: additionalChoices "CJD 8-26-2001 Choose an instance variable for aClass including all super classes." | choices | aClass isNil ifTrue: [^nil]. choices := SortedCollection withAll: additionalChoices. choices addAll: aClass allInstVarNames. "choices := aClass allInstVarNames." ^(self create: 'InstanceVariable view' on: nil asValue choices: choices caption: 'Select an instance variable') showModal! create: viewName on: aValueModel choices: aSequenceableCollection caption: aStringCaptionOrNil "Answer a dialog capable of allowing the user to choose from aSequenceableCollection. The initial list selection is determined by the value of aValueModel and the list choice made is sent back as this model's value. The dialog is given a caption according to aStringCaptionOrNil. If nil the default caption is used." | prompter | "Ensure referenced views are not stripped" 'OK Cancel button block'. (prompter := self create: viewName) choices: aSequenceableCollection; model: aValueModel. aStringCaptionOrNil notNil ifTrue: [ prompter caption: aStringCaptionOrNil ]. ^prompter! valueOfInstanceVariable: instanceVariableName of: anObject "Private - CJD 9-5-2001 Return the value of instanceVariableName in anObject. " instanceVariableName = 'self' ifTrue: [^anObject]. instanceVariableName = 'super' ifTrue: [^anObject]. (anObject class allInstVarNames includes: instanceVariableName) ifFalse: [^nil]. ^anObject instVarAt: (anObject class allInstVarNames indexOf: instanceVariableName)! ! !CJDAttributeLookUp class categoriesFor: #chooseClassFor:!public! ! !CJDAttributeLookUp class categoriesFor: #chooseMethodFor:!public! ! !CJDAttributeLookUp class categoriesFor: #chooseVariableFor:with:!public! ! !CJDAttributeLookUp class categoriesFor: #create:on:choices:caption:!instance creation!public! ! !CJDAttributeLookUp class categoriesFor: #valueOfInstanceVariable:of:!private! ! "Binary Globals"! "Resources"! (ResourceIdentifier class: CJDAttributeLookUp name: 'Class view') assign: (Object fromBinaryStoreBytes: (ByteArray fromHexString: '2153544220312046020C0001000000566965775265736F75726365000000000E0124005354425265736F757263655354424279746541727261794163636573736F7250726F78790000000072000000C2090000215354422030204E080C000A0000005354425669657750726F7879000000004E020D0001000000535442436C61737350726F78790000000036000600537472696E6707000000446F6C7068696E920000000A0000004469616C6F67566965772600050041727261791E0000000000000000000000C2000000020000000100980101000200600000000000000006010B0053797374656D436F6C6F72000000001F00000006020500506F696E7400000000F5010000BD02000087000000000000000000000000000000000000000602120050726F706F7274696F6E616C4C61796F7574000000000E021200535442436F6C6C656374696F6E50726F7879000000007A00000000000000A0000000920000000A00000044696374696F6E617279C20000000100000006020B004173736F63696174696F6E000000005A000000000000007A00000000000000A0000000920000000D0000005265666572656E636556696577C20000000E0000000000000060000000C20000000200000036000C004C61726765496E7465676572040000000000004401000200C00100000000000000000000000000000700000000000000000000000000000000000000060212005265736F757263654964656E746966696572000000007A00000000000000A00000009200000012000000436F6D706F7369746550726573656E74657292000000160000004F4B2043616E63656C20627574746F6E20626C6F636B0000000006010F004D65737361676553657175656E6365000000005A010000000000007A00000000000000A000000092000000110000004F726465726564436F6C6C656374696F6EC20000000100000006030B004D65737361676553656E64000000000E010E0053544253796D626F6C50726F787900000000920000001000000063726561746541743A657874656E743AC200000002000000120100000000000001000000450200001201000000000000A30200004D000000C001000006010F0057494E444F57504C4143454D454E5400000000360009004279746541727261792C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000220100005101000048010000C2000000000000001201000000000000C1000000C1000000000000001300000001000000100000000E021A005354424964656E7469747944696374696F6E61727950726F7879000000007A00000000000000A000000092000000120000004964656E7469747944696374696F6E617279C20000000000000000000000000000000000000000000000000000009B2500000000000000000000000000001201000000000000F5010000370100000100000000000000000000000603090053656D6170686F7265000000000000000000000000010000000000000012020000040000004C73E17782020000000000005A01000000000000B0020000C200000003000000E20200000000000010030000C20000000200000012010000000000000B0000000B0000001201000000000000B3020000C702000060000000E2020000000000000A030000000000009200000005000000746578743AC200000001000000920000000E00000043686F6F7365206F6E65206F663A60000000E2020000000000000A0300000000000092000000080000006D656E754261723AC20000000100000000000000600000006203000000000000820300002C0000002C0000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF05000000050000005E010000680100005A01000000000000B0020000C2000000020000005A000000000000007A00000000000000A0000000920000000D000000436F6E7461696E657256696577C20000000F0000000000000060000000C200000002000000120200000400000000000044010002009005000000000000F2000000000000001F00000000000000070000000000000000000000000000000000000006070C00426F726465724C61796F7574000000000100000001000000000000000000000000000000000000005A000000000000007A00000000000000A000000092000000080000004C69737456696577C20000001C0000000000000090050000C20000000200000012020000040000004D100144010400002006000046030900020000004C6973744D6F64656C000000005A01000000000000B00200000004000000000000060014004964656E74697479536561726368506F6C6963790000000000000000000000000700000000000000000000000000000000000000000000001202000008000000E300FFFF000000007A00000000000000A0000000920000001100000042617369634C6973744162737472616374000000000E02110053544253696E676C65746F6E50726F7879000000007A00000000000000A0000000920000001000000049636F6E496D6167654D616E616765720A03000000000000920000000700000063757272656E740000000000000000000000000000000000000000460C0E00040000004C69737456696577436F6C756D6E000000009200000005000000436C617373830200000A0300000000000092000000040000006C656674E00600007A00000000000000A00000009200000010000000536F72746564436F6C6C656374696F6E000000000000000020060000000000001000000000000000000000005A01000000000000B0020000000400000A0300000000000092000000060000007265706F727401000000000000004108000082020000000000005A01000000000000B0020000C200000002000000E20200000000000010030000C20000000200000012010000000000000D0000001100000012010000000000008B0200002B02000020060000E202000000000000D0040000C2000000010000009200000005000000436C617373200600006203000000000000820300002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF06000000080000004B0100001D0100005A01000000000000B002000000040000B00300000000000015000000CA03000000000000E0030000C20000000200000020060000920000000700000063686F696365730602090052656374616E676C650000000012010000000000000D0000001100000012010000000000000D0000000B00000082020000000000005A01000000000000B0020000C200000001000000E20200000000000010030000C200000002000000120100000000000001000000010000001201000000000000A302000045020000900500006203000000000000820300002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000051010000220100005A01000000000000B0020000C20000000100000020060000B00300000000000013000000C0010000B00300000000000015000000460504000300000049636F6E0000000000000000100000000E02110053544253696E676C65746F6E50726F7879000000009A000000000000005200000007000000446F6C7068696E5200000018000000496D61676552656C617469766546696C654C6F6361746F72BA00000000000000520000000700000063757272656E74520000000F00000056616C75654469616C6F672E69636F0E021F0053544245787465726E616C5265736F757263654C69627261727950726F7879000000005200000010000000646F6C7068696E64723030352E646C6C00000000'))! (ResourceIdentifier class: CJDAttributeLookUp name: 'InstanceVariable view') assign: (Object fromBinaryStoreBytes: (ByteArray fromHexString: '2153544220312046020C0001000000566965775265736F75726365000000000E0124005354425265736F757263655354424279746541727261794163636573736F7250726F78790000000072000000B8090000215354422030204E080C000A0000005354425669657750726F7879000000004E020D0001000000535442436C61737350726F78790000000036000600537472696E6707000000446F6C7068696E920000000A0000004469616C6F67566965772600050041727261791B0000000000000000000000C2000000020000000100980101000200600000000000000006010B0053797374656D436F6C6F72000000001F00000006020500506F696E7400000000F5010000BD02000087000000000000000000000000000000000000000602120050726F706F7274696F6E616C4C61796F7574000000000E021200535442436F6C6C656374696F6E50726F7879000000007A00000000000000A0000000920000000A00000044696374696F6E617279C20000000100000006020B004173736F63696174696F6E000000005A000000000000007A00000000000000A0000000920000000D0000005265666572656E636556696577C20000000E0000000000000060000000C20000000200000036000C004C61726765496E7465676572040000000000004401000200C00100000000000000000000000000000700000000000000000000000000000000000000060212005265736F757263654964656E746966696572000000007A00000000000000A00000009200000012000000436F6D706F7369746550726573656E74657292000000160000004F4B2043616E63656C20627574746F6E20626C6F636B0000000006010F004D65737361676553657175656E6365000000005A010000000000007A00000000000000A000000092000000110000004F726465726564436F6C6C656374696F6EC20000000100000006030B004D65737361676553656E64000000000E010E0053544253796D626F6C50726F787900000000920000001000000063726561746541743A657874656E743AC200000002000000120100000000000001000000450200001201000000000000A30200004D000000C001000006010F0057494E444F57504C4143454D454E5400000000360009004279746541727261792C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000220100005101000048010000C2000000000000001201000000000000C1000000C1000000000000001300000001000000100000000E021A005354424964656E7469747944696374696F6E61727950726F7879000000007A00000000000000A000000092000000120000004964656E7469747944696374696F6E617279C2000000000000000000000000000000000000000000000000000000D33100000000000000000000000000001201000000000000F5010000370100000603090053656D6170686F7265000000000000000000000000010000000000000012020000040000004C73E17782020000000000005A01000000000000B0020000C200000003000000E20200000000000010030000C20000000200000012010000000000000B0000000B0000001201000000000000B3020000C702000060000000E2020000000000000A030000000000009200000005000000746578743AC200000001000000920000000E00000043686F6F7365206F6E65206F663A60000000E2020000000000000A0300000000000092000000080000006D656E754261723AC20000000100000000000000600000006203000000000000820300002C0000002C0000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF05000000050000005E010000680100005A01000000000000B0020000C2000000020000005A000000000000007A00000000000000A0000000920000000D000000436F6E7461696E657256696577C20000000F0000000000000060000000C200000002000000120200000400000000000044010002009005000000000000F2000000000000001F00000000000000070000000000000000000000000000000000000006070C00426F726465724C61796F7574000000000100000001000000000000000000000000000000000000005A000000000000007A00000000000000A000000092000000080000004C69737456696577C20000001C0000000000000090050000C20000000200000012020000040000004D100144010400002006000046030900020000004C6973744D6F64656C000000005A01000000000000B00200000004000000000000060014004964656E74697479536561726368506F6C69637900000000000000000000000007000000000000000000000000000000000000000000000012020000080000005F02FFFF000000007A00000000000000A0000000920000001100000042617369634C6973744162737472616374000000000E02110053544253696E676C65746F6E50726F7879000000007A00000000000000A0000000920000001000000049636F6E496D6167654D616E616765720A03000000000000920000000700000063757272656E740000000000000000000000000000000000000000460C0E00040000004C69737456696577436F6C756D6E0000000092000000060000004D6574686F64830200000A0300000000000092000000040000006C656674E00600007A00000000000000A00000009200000010000000536F72746564436F6C6C656374696F6E000000000000000020060000000000001000000000000000000000005A01000000000000B0020000000400000A0300000000000092000000060000007265706F727401000000000000004108000082020000000000005A01000000000000B0020000C200000002000000E20200000000000010030000C20000000200000012010000000000000D0000001100000012010000000000008B0200002B02000020060000E202000000000000D0040000C20000000100000092000000060000004D6574686F64200600006203000000000000820300002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF06000000080000004B0100001D0100005A01000000000000B002000000040000B00300000000000015000000CA03000000000000E0030000C20000000200000020060000920000000700000063686F696365730602090052656374616E676C650000000012010000000000000D0000001100000012010000000000000D0000000B00000082020000000000005A01000000000000B0020000C200000001000000E20200000000000010030000C200000002000000120100000000000001000000010000001201000000000000A302000045020000900500006203000000000000820300002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000051010000220100005A01000000000000B0020000C20000000100000020060000B00300000000000013000000C0010000B00300000000000013000000460504000300000049636F6E0000000000000000100000000E02110053544253696E676C65746F6E50726F7879000000009A000000000000005200000007000000446F6C7068696E5200000018000000496D61676552656C617469766546696C654C6F6361746F72BA00000000000000520000000700000063757272656E74520000000F00000056616C75654469616C6F672E69636F0E021F0053544245787465726E616C5265736F757263654C69627261727950726F7879000000005200000010000000646F6C7068696E64723030352E646C6C00000000'))! (ResourceIdentifier class: CJDAttributeLookUp name: 'Method view') assign: (Object fromBinaryStoreBytes: (ByteArray fromHexString: '2153544220312046020C0001000000566965775265736F75726365000000000E0124005354425265736F757263655354424279746541727261794163636573736F7250726F7879000000007200000019160000215354422031204E080C000A0000005354425669657750726F7879000000009A000000000000005200000010000000446F6C7068696E204D56502042617365520000000A0000004469616C6F6756696577620000001E000000000000000000000062000000020000000100980101000200A00100000000000006010B0053797374656D436F6C6F72000000001F00000006020500506F696E7400000000F5010000BD02000087000000000000000000000000000000A00100000602120050726F706F7274696F6E616C4C61796F757400000000CA000000000000009A000000000000005200000007000000446F6C7068696E520000000A00000044696374696F6E617279620000000300000006020B004173736F63696174696F6E000000009A010000000000009A00000000000000C0010000520000000D000000436F6E7461696E657256696577620000000F00000000000000A0010000620000000200000082000000040000000000004401000200D00200000000000002020000000000001F0000000000000007000000000000000000000000000000D002000000000000EA000000000000000001000062000000040000009A010000000000009A00000000000000C001000052000000080000005465787445646974620000001000000000000000D002000062000000020000008200000004000000800001440104000060030000000000000000000000000000070000000000000000000000000000006003000000000000820000000400000001D5E17706020D004E756C6C436F6E7665727465720000000000000000000000000500000006010F004D65737361676553657175656E636500000000CA00000000000000D0000000620000000300000006030B004D65737361676553656E6400000000BA00000000000000520000001000000063726561746541743A657874656E743A62000000020000002202000000000000D7010000010000002202000000000000AF01000033000000600300003204000000000000BA00000000000000520000000F00000073656C656374696F6E52616E67653A620000000100000006030800496E74657276616C00000000030000000100000003000000600300003204000000000000BA00000000000000520000000F0000006973546578744D6F6469666965643A6200000001000000200000006003000006010F0057494E444F57504C4143454D454E5400000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB00000000000000C201000019000000CA00000000000000D000000062000000000000002202000000000000C1000000C10000000000000013000000520000000D000000636C61737346696C74657254429A0100000000000070030000620000001000000000000000D0020000620000000200000082000000040000008000014401040000B005000000000000000000000000000007000000000000000000000000000000B005000000000000820000000400000001D5E177D203000000000000000000000000000005000000F203000000000000CA00000000000000D00000006200000003000000320400000000000050040000620000000200000022020000000000000B000000010000002202000000000000CD01000033000000B00500003204000000000000B00400006200000001000000E204000000000000030000000100000003000000B0050000320400000000000010050000620000000100000020000000B00500004205000000000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0500000000000000EB00000019000000CA00000000000000D000000080050000900500000000000013000000520000000E0000006D6574686F6446696C746572544200000000F203000000000000CA00000000000000D000000062000000010000003204000000000000500400006200000002000000220200000000000001000000010000002202000000000000930300003D000000D00200004205000000000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000C90100001E000000CA00000000000000D00000006200000002000000B00500006003000090050000000000001300000001000000B2020000000000009A01000000000000E0020000620000000F00000000000000A0010000620000000200000082000000040000000000004401000200D007000000000000000000000000000007000000000000000000000000000000D007000006040A00477269644C61796F75740000000003000000010000000100000001000000EA00000000000000000100008005000000000000F203000000000000CA00000000000000D000000062000000010000003204000000000000500400006200000002000000220200000000000001000000710200002202000000000000930300003F000000D00700004205000000000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000038010000C901000057010000CA00000000000000D000000062000000020000009A01000000000000E0020000620000000F00000000000000D0070000620000000200000082000000040000000000004401000200F00800000000000002020000000000001F0000000000000007000000000000000000000000000000F008000000000000EA000000000000000001000062000000020000009A010000000000009A00000000000000C00100005200000008000000436865636B426F78620000001000000000000000F00800006200000002000000820000000400000003200144010000006009000046040B000200000056616C7565486F6C646572000000000000000000000000060011004E65766572536561726368506F6C6963790000000020000000000000000000000007000000000000000000000000000000600900000000000082000000040000000914E277D203000000000000000000000000000000000000F203000000000000CA00000000000000D000000062000000020000003204000000000000500400006200000002000000220200000000000065000000010000002202000000000000E30000003D000000600900003204000000000000BA000000000000005200000005000000746578743A620000000100000052000000100000005573652061737065637456616C75653A600900004205000000000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3200000000000000A30000001E000000CA00000000000000D000000080050000900500000000000013000000520000000A00000061737065637443686B6200000000F203000000000000CA00000000000000D000000062000000010000003204000000000000500400006200000002000000220200000000000001000000010000002202000000000000C90100003F000000F00800004205000000000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000E40000001F000000CA00000000000000D00000006200000001000000600900009005000000000000130000009A010000000000009A00000000000000C0010000520000000D0000005265666572656E636556696577620000000E00000000000000D0070000620000000200000082000000040000000000004401000200D00B000000000000000000000000000007000000000000000000000000000000D00B0000060212005265736F757263654964656E746966696572000000009A00000000000000C0010000520000000900000050726573656E74657252000000160000004F4B2043616E63656C20627574746F6E20626C6F636B00000000F203000000000000CA00000000000000D0000000620000000100000032040000000000005004000062000000020000002202000000000000C9010000010000002202000000000000CB0100003F000000D00B00004205000000000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE400000000000000C90100001F000000620000000000000090050000000000001500000090050000000000001300000036000500466C6F6174080000009A9999999999C93FB2020000000000009A01000000000000E0020000620000000F00000000000000A0010000620000000200000082000000040000000000004401000200500D00000000000002020000000000001F0000000000000007000000000000000000000000000000500D000006070C00426F726465724C61796F7574000000000100000001000000000000000000000000000000000000009A010000000000009A000000000000005200000017000000446F6C7068696E20436F6D6D6F6E20436F6E74726F6C7352000000080000004C69737456696577620000001E00000000000000500D0000620000000200000082000000040000004D10014401040000C00D000046030900020000004C6973744D6F64656C00000000CA00000000000000D00000008005000000000000060014004964656E74697479536561726368506F6C69637900000000000000000000000007000000000000000000000000000000C00D00000000000082000000080000004501FFFF000000009A00000000000000C0010000520000001100000042617369634C6973744162737472616374000000000E02110053544253696E676C65746F6E50726F7879000000009A00000000000000C0010000520000001000000049636F6E496D6167654D616E61676572BA00000000000000520000000700000063757272656E74000000000000000000000000000000000000000000000000CA00000000000000D00000006200000002000000460C0E00050000004C69737456696577436F6C756D6E0000000052000000060000004D6574686F64C3010000BA0000000000000052000000040000006C65667406040C00426C6F636B436C6F737572650000000026030D004D6574686F64436F6E74657874010000000100000026051200436F6D70696C656445787072657373696F6E01000000810100009A0000000000000080020000520000000F000000556E646566696E65644F626A6563745200000004000000646F4974620000000200000052000000170000005B3A6974656D207C206974656D2073656C6563746F725D6200000001000000CA000000000000009A0000000000000080020000520000000E000000506F6F6C44696374696F6E61727980050000720000000A000000FB01040059119E6A6469BA00000000000000520000000800000073656C6563746F720000000000000000030000000B000000D00F0000820F000000000000A20F00000200000001000000C20F00000100000081020000E00F00005200000004000000646F4974620000000200000052000000330000005B3A6974656D41203A6974656D4220207C206974656D412073656C6563746F72203C206974656D422073656C6563746F72205D6200000001000000CA000000000000005010000080050000720000000E000000FB0208005A59119E129E806A646980100000000000000000000000000000050000000B000000C01000000000000000000000C00D000000000000010000000000000000000000320F0000000000005200000005000000436C61737391010000600F0000820F000000000000A20F00000100000001000000C20F00000200000081010000E00F00005200000004000000646F4974620000000200000052000000280000005B3A6974656D207C206974656D206D6574686F64436C61737320646973706C6179537472696E675D6200000001000000CA000000000000005010000080050000720000000B000000FB01050059119E9F6A6469BA00000000000000520000000B0000006D6574686F64436C617373BA00000000000000520000000D000000646973706C6179537472696E670000000000000000030000000B00000070110000820F000000000000A20F00000200000001000000C20F00000200000081020000E00F00005200000004000000646F4974620000000200000052000000510000005B3A6974656D41203A6974656D4220207C206974656D41206D6574686F64436C617373207072696E74537472696E67203C206974656D42206D6574686F64436C617373207072696E74537472696E67205D6200000001000000CA0000000000000050100000800500007200000010000000FB020A005A59119E9F129E9F806A6469E0110000BA00000000000000520000000B0000007072696E74537472696E67000000000000000000000000050000000B000000401200000000000000000000C00D000000000000010000000000000000000000BA0000000000000052000000060000007265706F7274620000000000000000000000410800000000000000000000F203000000000000CA00000000000000D00000006200000002000000320400000000000050040000620000000200000022020000000000000D0000001100000022020000000000007B0300001B020000C00D00003204000000000000A00A0000620000000100000052000000060000004D6574686F64C00D00004205000000000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0600000008000000C301000015010000CA00000000000000D000000080050000900500000000000017000000EA00000000000000000100006200000002000000C00D0000520000000700000063686F696365730602090052656374616E676C650000000022020000000000000D0000001100000022020000000000000D0000000B000000F203000000000000CA00000000000000D0000000620000000100000032040000000000005004000062000000020000002202000000000000010000003D00000022020000000000009303000035020000500D00004205000000000000720000002C0000002C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000001E000000C901000038010000CA00000000000000D00000006200000001000000C00D0000900500000000000013000000060208004672616374696F6E00000000310000001B00000010000000EA0000000000000000010000800500000000000000000000000000000000000000000000DD2C00000000000000000000000000002202000000000000F5010000370100000100000000000000000000000603090053656D6170686F726500000000000000000000000001000000000000008200000004000000A4CCE177F203000000000000CA00000000000000D00000006200000003000000320400000000000050040000620000000200000022020000000000000B0000000B0000002202000000000000A3030000E5020000A00100003204000000000000A00A00006200000001000000520000000E00000043686F6F7365206F6E65206F663AA00100003204000000000000BA0000000000000052000000080000006D656E754261723A620000000100000000000000A00100004205000000000000720000002C0000002C0000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0500000005000000D601000077010000CA00000000000000D00000006200000003000000D0020000500D0000D0070000900500000000000015000000460504000300000049636F6E0000000000000000100000000E02110053544253696E676C65746F6E50726F7879000000009A000000000000005200000007000000446F6C7068696E5200000018000000496D61676552656C617469766546696C654C6F6361746F72BA00000000000000520000000700000063757272656E74520000000F00000056616C75654469616C6F672E69636F0E021F0053544245787465726E616C5265736F757263654C69627261727950726F7879000000005200000010000000646F6C7068696E64723030352E646C6C00000000'))!