SystemOrganization addCategory: #'OB-Wrapper'! !OBCodeBrowser methodsFor: '*ob-wrapper-commands' stamp: 'lr 1/28/2008 23:42'! cmdMethodWrapper ^ ORCmdMethodWrapper allSubclasses! ! ORCommand subclass: #ORCmdMethodWrapper instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'OB-Wrapper'! ORCmdMethodWrapper subclass: #ORCmdInstallMethodWrapper instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'OB-Wrapper'! !ORCmdInstallMethodWrapper methodsFor: 'execution' stamp: 'lr 11/21/2007 14:43'! execute | wrapper environment | wrapper := self chooseFrom: self wrapperNames title: 'select wrapper class'. wrapper := (Smalltalk classNamed: wrapper) ifNil: [ ^ self ]. environment := SelectorEnvironment new. self environment classesAndSelectorsDo: [ :class :selector | (wrapper on: selector inClass: class) isNil ifFalse: [ environment addClass: class selector: selector ] ]. (OREnvironmentBrowser selection: target) environment: environment; open ! ! !ORCmdInstallMethodWrapper methodsFor: 'accessing' stamp: 'lr 11/21/2007 14:35'! label ^ 'install'! ! !ORCmdInstallMethodWrapper methodsFor: 'private' stamp: 'lr 1/5/2008 12:17'! wrapperNames ^ (self wrapperClass withAllSubclasses collect: [ :each | each name ]) asSortedCollection: [ :a :b | a <= b ]! ! !ORCmdMethodWrapper methodsFor: 'accessing' stamp: 'lr 1/28/2008 22:48'! cluster ^ #'method wrapper'! ! !ORCmdMethodWrapper methodsFor: 'testing' stamp: 'lr 3/14/2010 12:07'! isActive ^ (requestor isSelected: target) and: [ self wrapperClass notNil ]! ! !ORCmdMethodWrapper methodsFor: 'accessing' stamp: 'lr 3/14/2010 12:08'! wrapperClass ^ Smalltalk at: #MwMethodWrapper ifAbsent: [ nil ]! ! ORCmdMethodWrapper subclass: #ORCmdUninstallMethodWrapper instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'OB-Wrapper'! !ORCmdUninstallMethodWrapper methodsFor: 'execution' stamp: 'lr 11/21/2007 14:39'! execute | method | self environment classesAndSelectorsDo: [ :class :selector | method := class compiledMethodAt: selector. method isMwMethodWrapper ifTrue: [ method uninstall ] ]! ! !ORCmdUninstallMethodWrapper methodsFor: 'accessing' stamp: 'lr 11/21/2007 14:14'! label ^ 'uninstall'! !