[squeak-dev] The Trunk: Tools-topa.620.mcz

commits at source.squeak.org commits at source.squeak.org
Mon May 4 22:25:44 UTC 2015


Tobias Pape uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-topa.620.mcz

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

Name: Tools-topa.620
Author: topa
Time: 5 May 2015, 12:25:24.029 am
UUID: 549e4118-d7f3-40de-a37d-38886dd9717d
Ancestors: Tools-mt.619

Use a temporary instead of an ensure around a return.

=============== Diff against Tools-mt.619 ===============

Item was changed:
  ----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  
+ 	| windowSpec treeSpec textSpec buttonSpec buttonOffset tool |
- 	| windowSpec treeSpec textSpec buttonSpec buttonOffset |
  	windowSpec := builder pluggableWindowSpec new.
  	windowSpec
  		model: self;
  		children: OrderedCollection new;
  		label: #label;
  		extent: self initialExtent.
  	
  	treeSpec := builder pluggableTreeSpec new.
  	treeSpec
  		model: self;
  		nodeClass: self class nodeClass;
  		roots: #getList;
  		keyPress: #explorerKey:from:event:;
  		getSelected: #currentSelection;
  		setSelected: #currentSelection:;
  		setSelectedParent: #currentParent:;
  		menu: #genericMenu:;
  		autoDeselect: false;
  		columns: (ObjectExplorerWrapper showContentsInColumns
  			ifTrue: [{
  				[:listMorph | (listMorph filteredItems collect: [:item |
  					item preferredWidthOfColumn: 1]) max].
  				nil "take all the space"}]);
  		frame: (0 at 0 corner: 1 at 0.71).
  	windowSpec children add: treeSpec.
  
  	buttonOffset := (Preferences standardButtonFont widthOfString: 'inspect') * 3/2.
  
  	textSpec := builder pluggableCodePaneSpec new.
  	textSpec
  		model: self;
  		getText: #expression;
  		editText: #expression:;
  		menu: #codePaneMenu:shifted:;
  		help: 'Evaluate expressions for the current tree selection...' translated;
  		frame: (LayoutFrame fractions: (0 at 0.71 corner: 1 at 1) offsets: (0 at 0 corner: buttonOffset negated at 0)).
  	windowSpec children add: textSpec.
  
  	buttonSpec := builder pluggableButtonSpec new
  		model: self;
  		label: 'inspect';
  		action: #inspectObject;
  		help: 'Switch to an inspector tool';
  		frame: (LayoutFrame fractions: (1 at 0.71 corner: 1 at 1) offsets: (buttonOffset negated at 0 corner: 0 @ 0)).
  	windowSpec children add: buttonSpec.
+ 	
+ 	tool := builder build: windowSpec.
+ 	self changed: #expandRootsRequested.
+ 	^ tool!
- 
- 	[^ builder build: windowSpec]
- 		ensure: [self changed: #expandRootsRequested]!



More information about the Squeak-dev mailing list