Eliot Miranda uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-eem.519.mcz ==================== Summary ==================== Name: Monticello-eem.519 Author: eem Time: 20 July 2012, 11:32:43.471678 am UUID: 9471e578-e04a-436d-9667-f2251444f036 Ancestors: Monticello-eem.518 Make file-out in the patch browser output class initializations and output class initializations and method removals last. =============== Diff against Monticello-eem.518 =============== Item was changed: ----- Method: MCCodeTool>>fileOutMessage (in category 'menus') ----- fileOutMessage "Put a description of the selected message on a file" | fileName | self selectedMessageName ifNotNil: [Cursor write showWhile: [self selectedClassOrMetaClass fileOutMethod: self selectedMessageName]. ^self]. items isEmpty ifTrue: [^self]. fileName := UIManager default request: 'File out on which file?' initialAnswer: 'methods'. Cursor write showWhile: + [| definitionStream removalInitStream | + definitionStream := WriteStream on: (String new: 1000). + removalInitStream := WriteStream on: (String new: 100). + definitionStream header; timeStamp. - [| internalStream | - internalStream := WriteStream on: (String new: 1000). - internalStream header; timeStamp. items do: [:patchOp| | def | def := patchOp definition. def isMethodDefinition ifTrue: [(def actualClass notNil and: [def actualClass includesSelector: def selector]) ifTrue: [def actualClass printMethodChunk: def selector withPreamble: true + on: definitionStream - on: internalStream moveSource: false + toFile: nil. + (def selector == #initialize and: [def classIsMeta]) ifTrue: + [removalInitStream nextChunkPut: def className, ' initialize'; cr]] - toFile: nil] ifFalse: + [removalInitStream nextChunkPut: def className, (def classIsMeta ifTrue: [' class'] ifFalse: ['']), ' removeSelector: ', def selector printString; cr]]. - [internalStream nextChunkPut: def className, (def classIsMeta ifTrue: [' class'] ifFalse: ['']), ' removeSelector: ', def selector printString]]. def isClassDefinition ifTrue: [def actualClass ifNotNil: + [definitionStream nextChunkPut: def actualClass definition. - [internalStream nextChunkPut: def actualClass definition. def comment ifNotNil: [def actualClass organization + putCommentOnFile: definitionStream - putCommentOnFile: internalStream numbered: 1 moveSource: false forClass: def actualClass]] ifNil: + [removalInitStream nextChunkPut: def className, ' removeFromSystem'; cr]]]. + definitionStream nextPutAll: removalInitStream contents. + FileStream writeSourceCodeFrom: definitionStream baseName: fileName isSt: true useHtml: false]! - [internalStream nextChunkPut: def className, ' removeFromSystem']]]. - FileStream writeSourceCodeFrom: internalStream baseName: fileName isSt: true useHtml: false]! |
Free forum by Nabble | Edit this page |