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

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

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

Name: Tools-eem.843
Author: eem
Time: 14 January 2019, 10:30:05.84058 am
UUID: 889764d2-df9b-4623-8ac7-65847938f31d
Ancestors: Tools-tpr.842

Retain the default label for a MessageTrace and restore it when there is no selection.  Hence preserve useful info like number of selected methods in a  browseAllSelect:.
Chris M, please review.

=============== Diff against Tools-tpr.842 ===============

Item was changed:
  MessageSet subclass: #MessageTrace
+ instanceVariableNames: 'autoSelectStrings messageSelections anchorIndex defaultSelectString'
- instanceVariableNames: 'autoSelectStrings messageSelections anchorIndex'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Tools-Browser'!
 
  !MessageTrace commentStamp: 'cmm 3/2/2010 20:26' prior: 0!
  A MessageTrace is a MessageSet allowing efficient sender/implementor message following.  With implementors indented below, and senders outdended above, message flow is succinctly expressed, hierarchically.
 
  My autoSelectStrings and messageSelections are Arrays of Booleans, parallel to my messageList.  Each boolean indicates whether that message is selected.  Each autoSelectStrings indicates which string should be highlighted in the code for each method in my messageList.!

Item was changed:
  ----- Method: MessageTrace>>messageListIndex: (in category 'actions') -----
  messageListIndex: anInteger
  autoSelectStrings notEmpty ifTrue:
  [ autoSelectString :=
  anInteger = 0
+ ifTrue:
+ [ defaultSelectString ifNotNil: [:default| self containingWindow setLabel: default].
+ '' ]
- ifTrue: [ '' ]
  ifFalse:
  [ messageListIndex := anInteger.  "setting the window label, below, can't wait for this.."
  self containingWindow setLabel: (self windowLabelAt: anInteger).
  (autoSelectStrings at: anInteger) ifNotNil: [ : fullSelector | fullSelector keywords first ] ] ].
  anInteger > 0 ifTrue:
  [ self
  messageAt: anInteger
  beSelected: true ].
  super messageListIndex: anInteger
  !

Item was changed:
  ----- Method: MessageTrace>>windowLabelAt: (in category 'private accessing') -----
  windowLabelAt: anInteger
 
  | str |
+ defaultSelectString ifNil:
+ [defaultSelectString := self containingWindow label].
  ^(str := autoSelectStrings at: anInteger)
  ifNil:
  [ 'Implementors of ',
  (self class
  parse: self selection
  toClassAndSelector: [ :class :selector | selector ]) ]
  ifNotNil:
  [ 'Senders of ', str ]
  !