[squeak-dev] The Trunk: Tools-ul.373.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 4 01:18:21 UTC 2011


Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ul.373.mcz

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

Name: Tools-ul.373
Author: ul
Time: 4 August 2011, 3:17:39.54 am
UUID: e6046b6a-c2db-3a45-ae50-191a085ec3f9
Ancestors: Tools-fbs.372

Removed unnecessary blocks.

=============== Diff against Tools-fbs.372 ===============

Item was changed:
  ----- Method: ChangeList>>selectSuchThat: (in category 'menu actions') -----
  selectSuchThat: aBlock
  	"select all changes for which block returns true"
+ 	listSelections := changeList collect: aBlock.
- 	listSelections := changeList collect: [ :change | aBlock value: change ].
  	self changed: #allSelections!

Item was changed:
  ----- Method: IndentingListItemMorph>>childrenDo: (in category 'enumeration') -----
  childrenDo: aBlock
  
  	firstChild ifNotNil: [
+ 		firstChild withSiblingsDo: aBlock ]!
- 		firstChild withSiblingsDo: [ :aNode | aBlock value: aNode].
- 	]!

Item was changed:
  ----- Method: PopUpMenu>>displayAt:withCaption:during: (in category 'displaying') -----
  displayAt: aPoint withCaption: captionOrNil during: aBlock
  	"Display the receiver just to the right of aPoint while aBlock is evaluated.  If the receiver is forced off screen, display it just to the right."
  	| delta savedArea captionForm captionSave outerFrame captionText tFrame frameSaveLoc captionBox |
  	marker ifNil: [self computeForm].
  	frame := frame align: marker leftCenter with: aPoint + (2 at 0).
  	outerFrame := frame.
  	captionOrNil notNil ifTrue:
  		[captionText := (DisplayText
  				text: captionOrNil asText
  				textStyle: MenuStyle copy centered)
  					foregroundColor: Color black
  					backgroundColor: Color white.
  		tFrame := captionText boundingBox insetBy: -2.
  		outerFrame := frame merge: (tFrame align: tFrame bottomCenter
  					with: frame topCenter + (0 at 2))].
  	delta := outerFrame amountToTranslateWithin: Display boundingBox.
  	frame right > Display boundingBox right
  		ifTrue: [delta := 0 - frame width @ delta y].
  	frame := frame translateBy: delta.
  	captionOrNil notNil ifTrue:
  		[captionForm := captionText form.
  		captionBox := captionForm boundingBox expandBy: 4.
  		captionBox := captionBox align: captionBox bottomCenter
  								with: frame topCenter + (0 at 2).
  		captionSave := Form fromDisplay: captionBox.
  		Display border: captionBox width: 4 fillColor: Color white.
  		Display border: captionBox width: 2 fillColor: Color black.
  		captionForm displayAt: captionBox topLeft + 4].
  	marker := marker align: marker leftCenter with: aPoint + delta +  (2 at 0).
  	savedArea := Form fromDisplay: frame.
  	self menuForm displayOn: Display at: (frameSaveLoc := frame topLeft).
  	selection ~= 0 ifTrue: [Display reverse: marker].
+ 	Cursor normal showWhile: aBlock.
- 	Cursor normal showWhile: [aBlock value].
  	savedArea displayOn: Display at: frameSaveLoc.
  	captionOrNil notNil ifTrue:
  		[captionSave displayOn: Display at: captionBox topLeft]!

Item was changed:
  ----- Method: StringHolder>>withSelectorAndMessagesIn:evaluate: (in category '*Tools') -----
  withSelectorAndMessagesIn: aCompiledMethod evaluate: aBlock
  	"Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any"
  
  	| selectorOrNil litGetter messages |
  	selectorOrNil := aCompiledMethod selector.
  	messages := Preferences thoroughSenders
  					ifTrue:
  						[litGetter := [:set :l|
  										(l isSymbol and: [l size > 0 and: [l first isLowercase]]) ifTrue:
  											[set add: l].
  										l isArray ifTrue:
  											[l inject: set into: litGetter copy].
  										set].
  						aCompiledMethod allLiterals
  						, (aCompiledMethod pragmas collect: [:pragma| pragma keyword])
  							inject: aCompiledMethod messages into: litGetter copy]
  					ifFalse: [aCompiledMethod messages].
  	(messages isEmpty	"if no messages, use only selector"
  	or: [messages size = 1 and: [messages includes: selectorOrNil]]) ifTrue:
  		[^selectorOrNil ifNotNil: [aBlock value: selectorOrNil]].  "If only one item, there is no choice"
  
  	self systemNavigation 
  		showMenuOf: messages
  		withFirstItem: selectorOrNil
+ 		ifChosenDo: aBlock!
- 		ifChosenDo: [:sel | aBlock value: sel]!

Item was changed:
  ----- Method: TimeProfileBrowser>>messageListKey:from: (in category 'private') -----
  messageListKey: aChar from: view 
  	"Respond to a Command key. Cmd-D means re-run block."
  
+ 	aChar == $d ifTrue: [ ^Cursor execute showWhile: block ].
- 	aChar == $d ifTrue: [^Cursor execute showWhile: [ block value ]].
  	^super messageListKey: aChar from: view!




More information about the Squeak-dev mailing list