# HG changeset patch # User Claus Gittinger # Date 1364393323 -3600 # Node ID a0b8519d7c509819ea03029ff8cf8f729dee9f6a # Parent 89017a36e6e056b16f38a40a6e61202fe5db64a1 class: SmalltalkChunkFileSourceWriter changed: #fileOutCategory:of:except:only:methodFilter:on: care for methods overwritten by extensions diff -r 89017a36e6e0 -r a0b8519d7c50 SmalltalkChunkFileSourceWriter.st --- a/SmalltalkChunkFileSourceWriter.st Wed Mar 27 15:07:20 2013 +0100 +++ b/SmalltalkChunkFileSourceWriter.st Wed Mar 27 15:08:43 2013 +0100 @@ -356,7 +356,7 @@ If both are nil, all are saved. See version-method handling in fileOut for what this is needed." - |sortedSelectors first prevPrivacy privacy interestingMethods cat| + |sortedSelectors first prevPrivacy privacy interestingMethods cat prjDef| interestingMethods := OrderedCollection new. aClass methodsDo:[:aMethod | @@ -381,6 +381,22 @@ ] ] ]. + + "/ care for methods which have been shadowed by an extension from another package!! + (prjDef := aClass theNonMetaclass projectDefinitionClass) notNil ifTrue:[ + prjDef hasSavedOverwrittenMethods ifTrue:[ + interestingMethods := interestingMethods collect:[:m | + |originalOrNil| + + (m package ~~ aClass package) ifTrue:[ + originalOrNil := prjDef savedOverwrittenMethods at:(aClass name -> m selector) ifAbsent:nil. + originalOrNil notNil ifTrue:[ self halt ]. + ]. + originalOrNil ? m + ]. + ] + ]. + interestingMethods notEmpty ifTrue:[ first := true. prevPrivacy := nil. @@ -571,7 +587,7 @@ !SmalltalkChunkFileSourceWriter class methodsFor:'documentation'! version_CVS - ^ '$Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.19 2012-12-17 12:48:08 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.20 2013-03-27 14:08:43 cg Exp $' ! version_SVN