# HG changeset patch # User Claus Gittinger # Date 1359042638 -3600 # Node ID 8311953750d6c13838bd10c8249f00e3e88fd18c # Parent 50c3faf6eb601f02bb3c22da6810ebbc59b2dd5d class: ClassDescription changed: #addChangeRecordForMethod: #addSelector:withMethod: #removeSelector: don't write change records for changes to anonymus classes, which are constructed on the fly diff -r 50c3faf6eb60 -r 8311953750d6 ClassDescription.st --- a/ClassDescription.st Thu Jan 24 16:24:00 2013 +0100 +++ b/ClassDescription.st Thu Jan 24 16:50:38 2013 +0100 @@ -820,7 +820,6 @@ "Created: / 28.3.1998 / 21:21:52 / cg" ! ! - !ClassDescription methodsFor:'Compatibility-V''Age'! categoriesFor:aSelector are:listOfCategories @@ -1181,7 +1180,10 @@ ]. (super addSelector:newSelector withMethod:newMethod) ifTrue:[ - self addChangeRecordForMethod:newMethod fromOld:oldMethod. + "/ only write change records for changes to non-anonymous classes + self containingNameSpace notNil ifTrue:[ + self addChangeRecordForMethod:newMethod fromOld:oldMethod. + ] ]. "Modified: / 09-09-1996 / 22:39:32 / stefan" @@ -1219,20 +1221,23 @@ ]. (super removeSelector:aSelector) ifTrue:[ - self addChangeRecordForRemoveSelector:aSelector fromOld:oldMethod. - "/ - "/ also notify a change of mySelf; - "/ - self changed:#methodDictionary with:aSelector. - - "/ - "/ also notify a change of Smalltalk; - "/ this allows a dependent of Smalltalk to watch all class - "/ changes (no need for observing all classes) - "/ - this allows for watchers to find out if its a new method or a method-change - "/ - MethodRemoveChangeNotificationParameter notNil ifTrue:[ - Smalltalk changed:#methodInClassRemoved with:(MethodRemoveChangeNotificationParameter changeClass:self changeSelector:aSelector). + "/ only write change records for changes to non-anonymous classes + self containingNameSpace notNil ifTrue:[ + self addChangeRecordForRemoveSelector:aSelector fromOld:oldMethod. + "/ + "/ also notify a change of mySelf; + "/ + self changed:#methodDictionary with:aSelector. + + "/ + "/ also notify a change of Smalltalk; + "/ this allows a dependent of Smalltalk to watch all class + "/ changes (no need for observing all classes) + "/ - this allows for watchers to find out if its a new method or a method-change + "/ + MethodRemoveChangeNotificationParameter notNil ifTrue:[ + Smalltalk changed:#methodInClassRemoved with:(MethodRemoveChangeNotificationParameter changeClass:self changeSelector:aSelector). + ] ] ] @@ -1285,19 +1290,22 @@ !ClassDescription methodsFor:'changes management'! addChangeRecordForMethod:aMethod + "{ Pragma: +optSpace }" + self obsoleteMethodWarning:'use addChangeRecordForMethod:fromOld:'. + "add a method-change-record to the changes file and to the current changeSet" UpdateChangeFileQuerySignal query ifTrue:[ - self writingChangePerform:#addChangeRecordForMethod:to: with:aMethod. + self writingChangePerform:#addChangeRecordForMethod:to: with:aMethod. ]. "this test allows a smalltalk without Projects/ChangeSets" Project notNil ifTrue:[ - UpdateChangeListQuerySignal query ifTrue:[ - Project addMethodChange:aMethod in:self - ] + UpdateChangeListQuerySignal query ifTrue:[ + Project addMethodChange:aMethod in:self + ] ] "Modified: / 20.1.1997 / 12:36:02 / cg" @@ -4229,11 +4237,11 @@ !ClassDescription class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.230 2013-01-03 09:20:11 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.231 2013-01-24 15:50:38 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.230 2013-01-03 09:20:11 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.231 2013-01-24 15:50:38 cg Exp $' ! !