'From Squeak3.4 of 1 March 2003 [latest update: #5170] on 28 March 2003 at 4:31:10 pm'! "Change Set: KCP-0018-FixCallerOfBrowse Date: 28 March 2003 Author: stephane ducasse, alexandre bergel, and nathanael schaerli To be able to remove browse from behavior, all the senders have been changed."! !CommandLineLauncherExample methodsFor: 'running' stamp: 'sd 3/28/2003 16:24'! startUp | className | className _ self parameterAt: 'class'. Browser newOnClass: (Smalltalk at: className asSymbol ifAbsent: [Object])! ! !MethodFinder methodsFor: 'initialize' stamp: 'sd 3/28/2003 16:25'! noteDangerous "Remember the methods with really bad side effects." Dangerous _ Set new. "Object accessing, testing, copying, dependent access, macpal, flagging" #(addInstanceVarNamed:withValue: haltIfNil copyAddedStateFrom: veryDeepCopy veryDeepCopyWith: veryDeepFixupWith: veryDeepInner: addDependent: evaluate:wheneverChangeIn: codeStrippedOut: playSoundNamed: isThisEverCalled isThisEverCalled: logEntry logExecution logExit) do: [:sel | Dangerous add: sel]. "Object error handling" #(cannotInterpret: caseError confirm: confirm:orCancel: doesNotUnderstand: error: halt halt: notify: notify:at: primitiveFailed shouldNotImplement subclassResponsibility tryToDefineVariableAccess:) do: [:sel | Dangerous add: sel]. "Object user interface" #(basicInspect beep inform: inspect inspectWithLabel: notYetImplemented inspectElement ) do: [:sel | Dangerous add: sel]. "Object system primitives" #(become: becomeForward: instVarAt:put: instVarNamed:put: nextInstance nextObject rootStubInImageSegment: someObject tryPrimitive:withArgs:) do: [:sel | Dangerous add: sel]. "Object private" #(errorImproperStore errorNonIntegerIndex errorNotIndexable errorSubscriptBounds: mustBeBoolean primitiveError: species storeAt:inTempFrame:) do: [:sel | Dangerous add: sel]. "Object, translation support" #(cCode: cCode:inSmalltalk: cCoerce:to: export: inline: returnTypeC: sharedCodeNamed:inCase: var:declareC:) do: [:sel | Dangerous add: sel]. "Object, objects from disk, finalization. And UndefinedObject" #(comeFullyUpOnReload: objectForDataStream: readDataFrom:size: rehash saveOnFile storeDataOn: actAsExecutor executor finalize retryWithGC:until: suspend) do: [:sel | Dangerous add: sel]. "No Restrictions: Boolean, False, True, " "Morph" #() do: [:sel | Dangerous add: sel]. "Behavior" #(obsolete confirmRemovalOf: copyOfMethodDictionary literalScannedAs:notifying: storeLiteral:on: addSubclass: removeSubclass: superclass: "creating method dictionary" addSelector:withMethod: compile: compile:notifying: compileAll compileAllFrom: compress decompile: defaultSelectorForMethod: methodDictionary: recompile:from: recompileChanges removeSelector: compressedSourceCodeAt: selectorAtMethod:setClass: allInstances allSubInstances inspectAllInstances inspectSubInstances thoroughWhichSelectorsReferTo:special:byte: "enumerating" allInstancesDo: allSubInstancesDo: allSubclassesDo: allSuperclassesDo: selectSubclasses: selectSuperclasses: subclassesDo: withAllSubclassesDo: "user interface" allCallsOn: browseAllAccessesTo: browseAllCallsOn: browseAllStoresInto: "too slow->" crossReference removeUninstantiatedSubclassesSilently "too slow->" unreferencedInstanceVariables "private" becomeCompact becomeUncompact flushCache format:variable:words:pointers: format:variable:words:pointers:weak: printSubclassesOn:level: removeSelectorSimply:) do: [:sel | Dangerous add: sel]. "Others " #("no tangible result" do: associationsDo: "private" adaptToCollection:andSend: adaptToNumber:andSend: adaptToPoint:andSend: adaptToString:andSend: instVarAt:put: asDigitsToPower:do: combinations:atATimeDo: doWithIndex: pairsDo: permutationsDo: reverseDo: reverseWith:do: with:do: withIndexDo: asDigitsAt:in:do: combinationsAt:in:after:do: errorOutOfBounds permutationsStartingAt:do: fromUser) do: [:sel | Dangerous add: sel]. #( fileOutPrototype addSpareFields makeFileOutFile ) do: [:sel | Dangerous add: sel]. #(recompile:from: recompileAllFrom: recompileChanges asPrototypeWithFields: asPrototype addInstanceVarNamed:withValue: addInstanceVariable addClassVarName: removeClassVarName: findOrAddClassVarName: tryToDefineVariableAccess: instanceVariableNames: ) do: [:sel | Dangerous add: sel]. ! ! !ObjectExplorer methodsFor: 'as yet unclassified' stamp: 'sd 3/28/2003 16:26'! genericMenu: aMenu | insideObject menu | currentSelection ifNil: [menu _ aMenu. menu add: '*nothing selected*' target: self selector: #yourself] ifNotNil: [menu _ DumberMenuMorph new defaultTarget: self. insideObject _ currentSelection withoutListWrapper. menu add: 'explore' target: insideObject selector: #explore; add: 'inspect' target: insideObject selector: #inspect; addLine; add: 'objects pointing to this value' target: Smalltalk selector: #browseAllObjectReferencesTo:except:ifNone: argumentList: (Array with: insideObject with: #() with: nil); addLine; add: 'browse full' target: Browser selector: #fullOnClass: argument: insideObject class; add: 'browse class' target: self selector: #openBrowser: argument: insideObject class; add: 'browse hierarchy' target: Utilities selector: #spawnHierarchyForClass:selector: argumentList: (Array with: insideObject class with: nil). insideObject class == Symbol ifTrue: [ menu addLine; add: ('senders of ', insideObject printString) target: Smalltalk selector: #browseAllCallsOn: argument: insideObject; add: ('implementors of ', insideObject printString) target: Smalltalk selector: #browseAllImplementorsOf: argument: insideObject]]. ^ menu! ! !ObjectExplorer methodsFor: 'as yet unclassified' stamp: 'sd 3/28/2003 16:27'! openBrowser: aClass Browser newOnClass: aClass! !