The Trunk: Tools-eem.660.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-eem.660.mcz

commits-2
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.660.mcz

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

Name: Tools-eem.660
Author: eem
Time: 7 January 2016, 11:33:54.290295 am
UUID: 97d54108-0f23-488e-a4f7-d7468e560a7c
Ancestors: Tools-pre.659

Make most uses of VersionBrowser>>browseVersionsOf:... go throguh ToolSet and make StandardToolSet search for missing methods in the current change set, avoiding having to hunt throguh the current change set when finding versions of deleted methods in mehtod lists such as Recent Submissions.

=============== Diff against Tools-pre.659 ===============

Item was changed:
  ----- Method: Debugger>>browseVersions (in category 'context stack menu') -----
  browseVersions
+ "Create and schedule a message set browser on all versions of the currently selected message selector."
+ (ToolSet
+ browseVersionsOf: self selectedClassOrMetaClass
+ selector: self selectedMessageName) ifNil: [self changed: #flash]!
- "Create and schedule a message set browser on all versions of the
- currently selected message selector."
-
- | class selector |
- class := self selectedClassOrMetaClass.
- selector := self selectedMessageName.
- VersionsBrowser
- browseVersionsOf: (class compiledMethodAt: selector
- ifAbsent: [^self changed: #flash])
- class: self selectedClass theNonMetaClass
- meta: class isMeta
- category: self selectedMessageCategoryName
- selector: selector!

Item was changed:
  ----- Method: FileContentsBrowser>>browseVersions (in category 'other') -----
  browseVersions
+ "Create and schedule a message set browser on all versions of the currently selected message selector."
+ (ToolSet
+ browseVersionsOf: self selectedClassOrMetaClass
+ selector: self selectedMessageName) ifNil: [self changed: #flash]!
- "Create and schedule a message set browser on all versions of the
- currently selected message selector."
- | class selector |
- (selector := self selectedMessageName) ifNotNil:
- [class := self selectedClassOrMetaClass.
- (class exists and: [class realClass includesSelector: selector]) ifTrue:
- [VersionsBrowser
- browseVersionsOf: (class realClass compiledMethodAt: selector)
- class: class realClass theNonMetaClass
- meta: class realClass isMeta
- category: self selectedMessageCategoryName
- selector: selector]]!

Item was changed:
  ----- Method: StandardToolSet class>>browseVersionsOf:selector: (in category 'browsing') -----
+ browseVersionsOf: class selector: selector
+ "Open and answer a browser on versions of the method.
+ If the method doesn't exist try and find version from the current change set.
+ If not found there, answer nil."
+ | methodOrNil methodCategory |
+ methodOrNil := class compiledMethodAt: selector ifAbsent: [].
+ methodOrNil ifNil:
+ [(ChangeSet current methodInfoFromRemoval: {class name. selector})
+ ifNil: [^nil]
+ ifNotNil:
+ [:pair|
+ methodOrNil := CompiledMethod toReturnSelfTrailerBytes:
+ (CompiledMethodTrailer new sourcePointer: pair first).
+ methodCategory := pair last]].
+ ^VersionsBrowser
+ browseVersionsOf: methodOrNil
+ class: class theNonMetaClass
+ meta: class isMeta
+ category: (methodCategory ifNil: [class organization categoryOfElement: selector])
+ selector: selector!
- browseVersionsOf: aClass selector: aSelector
- "Open a browser"
- VersionsBrowser
- browseVersionsOf: (aClass compiledMethodAt: aSelector)
- class: aClass theNonMetaClass
- meta: aClass isMeta
- category: (aClass organization categoryOfElement: aSelector)
- selector: aSelector!

Item was changed:
  ----- Method: StringHolder>>browseVersions (in category '*Tools') -----
  browseVersions
  "Create and schedule a Versions Browser, showing all versions of the
  currently selected message. Answer the browser or nil."
+ | selector |
+ self classCommentIndicated ifTrue:
+ [ClassCommentVersionsBrowser browseCommentOf: self selectedClass.
+ ^nil].
- | selector class |
- self classCommentIndicated
- ifTrue: [ ClassCommentVersionsBrowser browseCommentOf: self selectedClass.
- ^nil ].
 
+ ^(selector := self selectedMessageName)
+ ifNil: [self inform: 'Sorry, only actual methods have retrievable versions.'. nil]
+ ifNotNil: [ToolSet browseVersionsOf: self selectedClassOrMetaClass selector: selector]!
- (selector := self selectedMessageName)
- ifNil:[ self inform: 'Sorry, only actual methods have retrievable versions.'. ^nil ]
- ifNotNil: [
- class := self selectedClassOrMetaClass.
- ^VersionsBrowser
- browseVersionsOf: (class compiledMethodAt: selector)
- class: self selectedClass
- meta: class isMeta
- category: (class organization categoryOfElement: selector)
- selector: selector]!