MethodWithBreakpoints.st
branchjv
changeset 18075 bd252c0beac9
parent 18011 deb0c3355881
parent 15505 4c46f8a71f52
child 18093 2b786a9af1d0
--- a/MethodWithBreakpoints.st	Sun Jul 14 19:27:31 2013 +0100
+++ b/MethodWithBreakpoints.st	Tue Jul 16 14:00:13 2013 +0100
@@ -60,6 +60,22 @@
     originalMethod := something.
 ! !
 
+!MethodWithBreakpoints methodsFor:'misc'!
+
+restoreOriginalMethod
+    "remove myself - i.e. replace by the original method 
+     (i.e. the one without line breakpoints)"
+
+    |cls selector|
+
+    (cls := self mclass) notNil ifTrue:[
+        (selector := self selector) notNil ifTrue:[
+            self halt.
+            cls basicAddSelector:selector withMethod:originalMethod    
+        ]
+    ]
+! !
+
 !MethodWithBreakpoints methodsFor:'queries'!
 
 isMethodWithBreakpoints
@@ -71,9 +87,10 @@
 !MethodWithBreakpoints class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.1 2012-08-02 12:22:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.2 2013-07-09 20:22:44 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.1 2012-08-02 12:22:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.2 2013-07-09 20:22:44 cg Exp $'
 ! !
+