asUndoOperation
^ ( self changeClass includesSelector: self selector )
ifTrue: [ | oldProtocol |
oldProtocol := RBBrowserEnvironment new whichProtocolIncludes: self selector in: self changeClass.
oldProtocol ifNil: [ oldProtocol := #accessing ].
changeFactory
addMethodSource: ( self methodSourceFor: self selector )
in: self changeClass
classified: oldProtocol
]
ifFalse: [ changeFactory removeMethod: selector from: self changeClass ]
self changeClass is nil
How to reproduce