The Trunk: Tools-bf.403.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-bf.403.mcz

commits-2
Bert Freudenberg uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-bf.403.mcz

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

Name: Tools-bf.403
Author: bf
Time: 19 April 2012, 6:26:28.218 pm
UUID: c5cae588-b172-4455-98ab-30c91e6043f8
Ancestors: Tools-eem.402

When manually recategorizing a method, make an entry in the changes file. Otherwise the methpd's latest change record in the changes file will not match what's in the image, confusing Monticello.

=============== Diff against Tools-eem.402 ===============

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 logged: true.
- dstClass organization classify: method selector  under: category suppressIfDefault: false.
  ^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!

Item was changed:
  ----- Method: Browser>>recategorizeMethodSelector: (in category 'message category list') -----
  recategorizeMethodSelector: sel
  "Categorize method named sel by looking in parent classes for a
  method category.
  Answer true if recategorized."
  self selectedClassOrMetaClass allSuperclasses
  do: [:ea |
  | thisCat |
  thisCat := ea organization categoryOfElement: sel.
  (thisCat ~= ClassOrganizer default
  and: [thisCat notNil])
+ ifTrue: [self classOrMetaClassOrganizer classify: sel under: thisCat logged: true.
- ifTrue: [self classOrMetaClassOrganizer classify: sel under: thisCat.
  self changed: #messageCategoryList.
  ^ true]].
  ^ false!

Item was changed:
  ----- Method: CodeHolder>>letUserReclassify:in: (in category 'categories') -----
  letUserReclassify: anElement in: aClass
  "Put up a list of categories and solicit one from the user.  
  Answer true if user indeed made a change, else false"
 
 
  | currentCat newCat |
  currentCat := aClass organization categoryOfElement: anElement.
  newCat := self
  categoryFromUserWithPrompt: 'choose category (currently "', currentCat, '")'
  for: aClass.
  (newCat ~~ nil and: [newCat ~= currentCat])
  ifTrue:
+ [aClass organization classify: anElement under: newCat suppressIfDefault: false logged: true.
- [aClass organization classify: anElement under: newCat suppressIfDefault: false.
  ^ true]
  ifFalse:
  [^ false]!