The Inbox: Tools-cmm.694.mcz

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

The Inbox: Tools-cmm.694.mcz

commits-2
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-cmm.694.mcz

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

Name: Tools-cmm.694
Author: cmm
Time: 18 April 2016, 6:40:45.920095 pm
UUID: 266d5d98-3fe1-424e-9786-bb3ab191b464
Ancestors: Tools-cmm.693

- Minor update to UI help element; now simply identifies itself.
- When a single message is selected in a MessageTrace, clicking it now deselects it so that all methods in the trace can be filed out.

=============== Diff against Tools-cmm.693 ===============

Item was changed:
  ----- Method: Inspector>>buildValuePaneWith: (in category 'toolbuilder') -----
  buildValuePaneWith: builder
  | textSpec |
  textSpec := builder pluggableTextSpec new.
  textSpec
  model: self;
  getText: #contents;
  setText: #accept:;
+ help: 'Selection details.';
- help: 'Select a field on the left.';
  selection: #contentsSelection;
  menu: #codePaneMenu:shifted:.
  ^textSpec!

Item was changed:
  ----- Method: MessageTrace>>addChildMessages:autoSelectString: (in category 'building') -----
  addChildMessages: methodReferences autoSelectString: aString
+ | currentIndentionLevel addables selectables selectableString newAnchor |
- | currentIndentionLevel addables selectables selectableString |
  selectableString := aString keywords
  ifEmpty: [ String empty ]
  ifNotEmptyDo: [ : keywords | keywords first ].
  [ (messageListIndex between: 1 and: autoSelectStrings size) ]
  whileFalse:
  [ autoSelectStrings add: selectableString ].
  autoSelectStrings
  at: messageListIndex
  put: selectableString.
  currentIndentionLevel := self currentIndentionLevel.
  "Don't add mulitple copies of the same method, if a method is already in the list we will merely select it."
  addables := methodReferences reject: [ : each | messageList includes: each ].
  addables do:
  [ : each |
  each stringVersion: (self indentionPrefixOfSize: currentIndentionLevel + 1) , each asStringOrText.
  messageList
  add: each
  afterIndex: self messageListIndex.
  autoSelectStrings
  add: nil
  afterIndex: self messageListIndex.
  messageSelections
  add: false
  afterIndex: self messageListIndex ].
  selectables :=
  addables copy
  addAll: (methodReferences select: [ : each | messageList includes: each ]) ;
  yourself.
  self deselectAll.
+ anchorIndex := nil.
  selectables do:
  [ : each |
  self
+ messageAt: (newAnchor := messageList indexOf: each)
+ beSelected: true.
+ anchorIndex ifNil: [ anchorIndex := newAnchor ] ].
- messageAt: (messageList indexOf: each)
- beSelected: true ].
  self changed: #messageList.
  "Select the first child method."
  self messageListIndex:
  (selectables size > 0
  ifTrue: [ messageList indexOf: selectables last ]
  ifFalse: [ messageList ifEmpty: [ 0 ] ifNotEmpty: [ 1 ] ])!

Item was changed:
  ----- Method: MessageTrace>>toggleSelectionAt:shifted:controlled: (in category 'actions') -----
+ toggleSelectionAt: anInteger shifted: isShifted controlled: isMouseDragging
+ anInteger = 0 ifTrue: [ ^ nil ].
+ (isMouseDragging not and: [anInteger = anchorIndex and: [ (messageSelections occurrencesOf: true) = 1 ]])
+ ifTrue:
+ [ self toggleMessageSelectionAt: anInteger.
+ anchorIndex := nil.
+ self messageListIndex: 0 ]
+ ifFalse:
- toggleSelectionAt: currentPosition shifted: isShifted controlled: isControlled
-
- currentPosition = 0 ifTrue: [ ^nil ].
- isControlled
- ifTrue:
- [ isShifted
- ifTrue:
- [ self selectAllBetweenAnchorAnd: currentPosition ]
- ifFalse:
- [ self toggleMessageSelectionAt: currentPosition.
- anchorIndex := currentPosition ] ]
- ifFalse:
  [ self deselectAll.
  isShifted
+ ifTrue: [ self selectAllBetweenAnchorAnd: anInteger ]
- ifTrue:
- [ self selectAllBetweenAnchorAnd: currentPosition ]
  ifFalse:
+ [ self
+ messageAt: anInteger
- [ self
- messageAt: currentPosition
  beSelected: true.
+ anchorIndex := anInteger ].
+ self messageListIndex: anInteger ]!
- anchorIndex := currentPosition ] ].
- self messageListIndex: currentPosition
- !