added flush for history
authorClaus Gittinger <cg@exept.de>
Thu, 07 Nov 1996 19:08:20 +0100
changeset 1924 0103d478f8a4
parent 1923 97b099fef985
child 1925 f1c8c6374af8
added flush for history
Class.st
--- a/Class.st	Thu Nov 07 18:56:32 1996 +0100
+++ b/Class.st	Thu Nov 07 19:08:20 1996 +0100
@@ -273,7 +273,7 @@
     ^ prev
 !
 
-keepOldMethods:aBoolean
+keepMethodHistory:aBoolean
     "turn on/off oldMethod remembering. If on, a methods previous version
      is kept locally, for later undo (or compare)."
 
@@ -286,11 +286,12 @@
     ].
 
     "
-     Class keepOldMethods:true
-     Class keepOldMethods:false
+     Class keepMethodHistory:true
+     Class keepMethodHistory:false
     "
 
     "Modified: 7.11.1996 / 18:36:00 / cg"
+    "Created: 7.11.1996 / 19:05:57 / cg"
 !
 
 lockChangesFile
@@ -309,20 +310,6 @@
     ^ prev
 !
 
-oldMethods
-    "return a dictionary containing method->previousVersion associations,
-     nil if method remembering has been turned off"
-
-    ^ OldMethods 
-
-    "
-     Class oldMethods
-    "
-
-    "Modified: 7.11.1996 / 18:36:00 / cg"
-    "Created: 7.11.1996 / 18:40:12 / cg"
-!
-
 tryLocalSourceFirst
     ^ TryLocalSourceFirst
 
@@ -355,6 +342,33 @@
     ^ UpdatingChanges
 ! !
 
+!Class class methodsFor:'accessing - history'!
+
+flushMethodHistory
+    "flush any method->previousVersion associations,
+     all history is lost."
+
+    OldMethods notNil ifTrue:[
+        OldMethods := IdentityDictionary new
+    ].
+
+    "Created: 7.11.1996 / 19:07:25 / cg"
+!
+
+methodHistory
+    "return a dictionary containing method->previousVersion associations,
+     nil if method remembering has been turned off"
+
+    ^ OldMethods 
+
+    "
+     Class oldMethods
+    "
+
+    "Modified: 7.11.1996 / 18:36:00 / cg"
+    "Created: 7.11.1996 / 19:06:28 / cg"
+! !
+
 !Class class methodsFor:'enumeration '!
 
 allClassesInCategory:aCategory do:aBlock
@@ -4433,6 +4447,6 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.208 1996-11-07 17:55:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.209 1996-11-07 18:08:20 cg Exp $'
 ! !
 Class initialize!