The Trunk: Tools-ul.277.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-ul.277.mcz

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

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

Name: Tools-ul.277
Author: ul
Time: 8 November 2010, 3:41:44.565 am
UUID: 21959a81-fb7f-7942-af9d-26b4f38b869d
Ancestors: Tools-ul.276

- copy methods instead of moving when they're dragged to another Browser's method categories and shift is pressed. Don't ask questions in this case.

=============== Diff against Tools-ul.276 ===============

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