[squeak-dev] The Trunk: Tools-ul.663.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 10 21:38:07 UTC 2016


Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ul.663.mcz

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

Name: Tools-ul.663
Author: ul
Time: 10 January 2016, 10:37:16.787674 pm
UUID: c5ee964a-880a-48a7-a20f-a3506f53e1d7
Ancestors: Tools-ul.662

Fixed the copy-case in Browser >> #dropOnMessageCategories:at:.

=============== Diff against Tools-ul.662 ===============

Item was changed:
  ----- Method: Browser>>dropOnMessageCategories:at: (in category 'drag and drop') -----
  dropOnMessageCategories: method at: index
  
  	| sourceClass destinationClass category copy |
  	copy := Sensor shiftPressed.
  	(method isKindOf: CompiledMethod) 
  		ifFalse:[^self inform: 'Can only drop methods'].
  	sourceClass := method methodClass.
  	destinationClass := self selectedClassOrMetaClass.
  	sourceClass == destinationClass ifTrue:[
  		category := self messageCategoryList at: index.
  		category = ClassOrganizer allCategory ifTrue: [^false].
  		destinationClass organization classify: method selector  under: category suppressIfDefault: false logged: true.
  		^true ].
+ 	(copy
+ 		or: [ (destinationClass inheritsFrom: sourceClass)
+ 		or: [ (sourceClass inheritsFrom: destinationClass)
+ 		or: [ sourceClass theNonMetaClass == destinationClass theNonMetaClass ] ] ])
- 	(copy not and: [
- 		(destinationClass inheritsFrom: sourceClass)
- 			or: [ (sourceClass inheritsFrom: destinationClass)
- 			or: [ sourceClass theNonMetaClass == destinationClass theNonMetaClass ] ] ]) 
  		ifFalse: [
  			(self confirm: (
  				'Classes "{1}" and "{2}" are unrelated.{3}Are you sure you want to move this method?'
  					format: { sourceClass. destinationClass. Character cr })) 
  						ifFalse: [ ^false ] ].
  	destinationClass
  		compile: method getSource
  		classified: (self messageCategoryList at: index)
  		withStamp: method timeStamp
  		notifying: nil.
  	copy ifFalse: [
  		sourceClass removeSelector: method selector ].
  	^true!



More information about the Squeak-dev mailing list