[Pkg] The Trunk: Monticello-eem.518.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jul 20 17:54:47 UTC 2012


Eliot Miranda uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-eem.518.mcz

==================== Summary ====================

Name: Monticello-eem.518
Author: eem
Time: 20 July 2012, 10:54:21.053 am
UUID: fbbef718-f8a6-4559-a8ab-72cd467babe0
Ancestors: Monticello-eem.517

Make file-out in the patch browser output class-side
method removals correctly.

=============== Diff against Monticello-eem.517 ===============

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:
  		[| 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])
- 			[:patchOp|
- 			patchOp definition isMethodDefinition ifTrue:
- 				[(patchOp definition actualClass notNil
- 				  and: [patchOp definition actualClass includesSelector: patchOp definition selector])
  					ifTrue:
+ 						[def actualClass
+ 							printMethodChunk: def selector
- 						[patchOp definition actualClass
- 							printMethodChunk: patchOp definition selector
  							withPreamble: true
  							on: internalStream
  							moveSource: false
  							toFile: nil]
  					ifFalse:
+ 						[internalStream nextChunkPut: def className, (def classIsMeta ifTrue: [' class'] ifFalse: ['']), ' removeSelector: ', def selector printString]].
+ 			def isClassDefinition ifTrue:
+ 				[def actualClass
- 						[internalStream nextChunkPut: patchOp definition className, ' removeSelector: ', patchOp definition selector printString]].
- 			patchOp definition isClassDefinition ifTrue:
- 				[patchOp definition actualClass
  					ifNotNil:
+ 						[internalStream nextChunkPut: def actualClass definition.
+ 						 def comment ifNotNil:
+ 							[def actualClass organization
- 						[internalStream nextChunkPut: patchOp definition actualClass definition.
- 						 patchOp definition comment ifNotNil:
- 							[patchOp definition actualClass organization
  								putCommentOnFile: internalStream
  								numbered: 1
  								moveSource: false
+ 								forClass: def actualClass]]
- 								forClass: patchOp definition actualClass]]
  					ifNil:
+ 						[internalStream nextChunkPut: def className, ' removeFromSystem']]].
- 						[internalStream nextChunkPut: patchOp definition className, ' removeFromSystem']]].
  		FileStream writeSourceCodeFrom: internalStream baseName: fileName isSt: true useHtml: false]!



More information about the Packages mailing list