class: SmalltalkChunkFileSourceWriter
changed: #fileOutCategory:of:except:only:methodFilter:on:
care for methods overwritten by extensions
--- 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