The Trunk: Tools-laza.285.mcz

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

The Trunk: Tools-laza.285.mcz

commits-2
Alexander Lazarević uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-laza.285.mcz

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

Name: Tools-laza.285
Author: laza
Time: 10 December 2010, 10:50:37.191 am
UUID: 2a126755-91c9-834b-a8e8-8175a8b841fd
Ancestors: Tools-fbs.284

Do nothing if method gets dragged on -all- method category.
Make it possible to drag method to "as yet unclassified" method category.

=============== Diff against Tools-fbs.284 ===============

Item was changed:
  ----- Method: Browser>>dropOnMessageCategories:at: (in category 'drag and drop') -----
  dropOnMessageCategories: method at: index
 
  | dstClass category copy |
  copy := Sensor shiftPressed.
  (method isKindOf: CompiledMethod)
  ifFalse:[^self inform: 'Can only drop methods'].
  dstClass := self selectedClassOrMetaClass.
  (dstClass == method methodClass) ifTrue:[
  category := self messageCategoryList at: index.
+ category = ClassOrganizer allCategory ifTrue: [^false].
+ dstClass organization classify: method selector  under: category suppressIfDefault: false.
- 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 ] ].
  dstClass
  compile: method getSource
  classified: (self messageCategoryList at: index)
  withStamp: method timeStamp
  notifying: nil.
  copy ifFalse: [
  method methodClass removeSelector: method selector ].
  ^true!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-laza.285.mcz

Stéphane Rollandin
that was fast !

thanks,

Stef