do not add history to non-smalltalk classes
authorClaus Gittinger <cg@exept.de>
Thu, 13 Jul 2006 17:42:10 +0200
changeset 1505 44c303e3558a
parent 1504 cfeab1ed934d
child 1506 e304342e4fb8
do not add history to non-smalltalk classes
HistoryManager.st
--- a/HistoryManager.st	Wed Jul 05 17:42:07 2006 +0200
+++ b/HistoryManager.st	Thu Jul 13 17:42:10 2006 +0200
@@ -407,6 +407,7 @@
 
 "/        Transcript show: 'Class definition: ', changedClass printString;cr.
         fullHistoryUpdate == true ifTrue:[
+            changedObject theMetaclass compilerClass == Compiler ifFalse:[^ self].
             self addHistory:#modification with:'class definition' toHistoryMethodOf:changedObject.
         ].
         ^ self
@@ -422,6 +423,7 @@
         "/ (someArgument does not contain the class we are interested in)
 
         fullHistoryUpdate == true ifTrue:[
+            changedObject theMetaclass compilerClass == Compiler ifFalse:[^ self].
             self addHistory:#modification with:'class variables' toHistoryMethodOf:changedObject.
         ].
         ^ self
@@ -435,6 +437,7 @@
         "/  add myself as dependents in order to get future change notifications
         "/ 
         fullHistoryUpdate == true ifTrue:[
+            someArgument theMetaclass compilerClass == Compiler ifFalse:[^ self].
             self createHistoryMethodFor:someArgument.
             self addHistory:#creation with:nil toHistoryMethodOf:someArgument.
         ].
@@ -454,6 +457,7 @@
 
     changedObject isBehavior ifTrue:[
         changedClass := changedObject.
+        changedClass theMetaclass compilerClass == Compiler ifFalse:[^ self].
 
         something == #methodDictionary ifTrue:[
             whatChange := #methodDictionary.
@@ -492,6 +496,8 @@
     ].
 
     changedClass notNil ifTrue:[
+        changedClass theMetaclass compilerClass == Compiler ifFalse:[^ self].
+
         whatChange == #methodDictionary ifTrue:[
             "/ ok; it is a changed method
 
@@ -570,7 +576,7 @@
 
     "Modified: / 27-08-1995 / 02:14:43 / claus"
     "Modified: / 18-03-1999 / 18:21:47 / stefan"
-    "Modified: / 05-07-2006 / 17:36:32 / cg"
+    "Modified: / 13-07-2006 / 17:41:35 / cg"
 ! !
 
 !HistoryManager methodsFor:'initialization'!
@@ -720,14 +726,11 @@
     "private - add a historyLine at end of the classes history methods
      source - if there is one"
 
-    |cls historyMethod oldSource newSource|
+    |meta historyMethod oldSource newSource|
 
-    aClass isMeta ifFalse:[
-        cls := aClass class.
-    ] ifTrue:[
-        cls := aClass
-    ].
-    historyMethod := cls compiledMethodAt: #history.
+    meta := aClass theMetaclass.
+
+    historyMethod := meta compiledMethodAt: #history.
     historyMethod notNil ifTrue:[
         oldSource := historyMethod source.
         oldSource notNil ifTrue:[
@@ -740,30 +743,26 @@
         ]
     ]
 
-    "Created: / 12.10.1996 / 20:31:50 / cg"
-    "Modified: / 24.10.1997 / 00:14:33 / cg"
-    "Modified: / 1.9.2004 / 19:04:18 / janfrog"
+    "Created: / 12-10-1996 / 20:31:50 / cg"
+    "Modified: / 01-09-2004 / 19:04:18 / janfrog"
+    "Modified: / 13-07-2006 / 17:42:03 / cg"
 !
 
 createHistoryMethodFor:aClass
     "private - create a history method"
 
-    |cls|
+    |meta|
 
-    aClass isMeta ifFalse:[
-        cls := aClass class.
-    ] ifTrue:[
-        cls := aClass
-    ].
+    meta := aClass theMetaclass.
 
     (Class updateChangeFileQuerySignal, Class updateChangeListQuerySignal) answer:false do:[
         Compiler
             compile:'history' 
-            forClass:cls 
+            forClass:meta 
             inCategory:'documentation'
     ].
 
-    "Modified: 14.10.1996 / 16:58:20 / cg"
+    "Modified: / 13-07-2006 / 17:42:25 / cg"
 ! !
 
 !HistoryManager::HistoryLine class methodsFor:'converting'!
@@ -876,7 +875,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.61 2006-07-05 15:42:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.62 2006-07-13 15:42:10 cg Exp $'
 ! !
 
 !HistoryManager::HistoryLine class methodsFor:'filtering'!
@@ -1502,7 +1501,7 @@
 !HistoryManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.61 2006-07-05 15:42:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.62 2006-07-13 15:42:10 cg Exp $'
 ! !
 
 HistoryManager initialize!