[squeak-dev] The Trunk: Morphic-mt.971.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 8 10:35:08 UTC 2015


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.971.mcz

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

Name: Morphic-mt.971
Author: mt
Time: 8 May 2015, 12:34:26.045 pm
UUID: 6bbf9618-bfc6-2b44-aac0-c542bb09ce4d
Ancestors: Morphic-mt.970

More workspace capabilities added to search bar. Old search bar morph deprecated.

=============== Diff against Morphic-mt.970 ===============

Item was changed:
  Model subclass: #SearchBar
+ 	instanceVariableNames: 'searchTerm selection resultsWidget workspace'
- 	instanceVariableNames: 'searchTerm selection resultsWidget'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Morphic-Menus-DockingBar'!

Item was added:
+ ----- Method: SearchBar>>bindingOf: (in category 'accessing') -----
+ bindingOf: x
+ 
+ 	^ self workspace bindingOf: x!

Item was added:
+ ----- Method: SearchBar>>workspace (in category 'accessing') -----
+ workspace
+ 
+ 	^ workspace ifNil: [workspace := Workspace new]!

Item was removed:
- TextMorph subclass: #SearchBarMorph
- 	instanceVariableNames: ''
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'Morphic-Menus-DockingBar'!

Item was removed:
- ----- Method: SearchBarMorph>>activate: (in category 'search') -----
- activate: event
- 
- 	event hand newKeyboardFocus: self.
- 	self selectAll!

Item was removed:
- ----- Method: SearchBarMorph>>fillStyle (in category 'initialize') -----
- fillStyle
- 
- 	^backgroundColor!

Item was removed:
- ----- Method: SearchBarMorph>>initialize (in category 'initialize') -----
- initialize
- 
- 	super initialize.
- 	text := Text new.
- 	backgroundColor := TranslucentColor gray alpha: 0.3.
- 	self width: 200.
- 	self crAction: (MessageSend receiver: self selector: #smartSearch:).
- 	self setBalloonText: 'Searches for globals and methods'.!

Item was removed:
- ----- Method: SearchBarMorph>>smartSearch: (in category 'search') -----
- smartSearch: evt
- 	"Take the user input and perform an appropriate search"
- 	| input newContents |
- 	input := self contents asString ifEmpty:[^self].
- 	(Smalltalk bindingOf: input) ifNotNil:[:assoc| | global |
- 		"It's a global or a class"
- 		global := assoc value.
- 		^ToolSet browse: (global isBehavior ifTrue:[global] ifFalse:[global class]) selector: nil.
- 	].
- 	(SystemNavigation new allImplementorsOf: input asSymbol) ifNotEmpty:[:list|
- 		^SystemNavigation new
- 			browseMessageList: list
- 			name: 'Implementors of ' , input
- 	].
- 	input first isUppercase ifTrue:[
- 		(UIManager default classFromPattern: input withCaption: '') ifNotNil:[:aClass|
- 			^ToolSet browse: aClass selector: nil.
- 		].
- 	] ifFalse:[
- 		^ToolSet default browseMessageNames: input
- 	].
- 	newContents := input, ' -- not found.'.
- 	self 
- 		newContents: newContents; 
- 		selectFrom: input size+1 to: newContents size.
- 	evt hand newKeyboardFocus: self!



More information about the Squeak-dev mailing list