The Trunk: Morphic-mt.1760.mcz

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

The Trunk: Morphic-mt.1760.mcz

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

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

Name: Morphic-mt.1760
Author: mt
Time: 26 April 2021, 9:10:01.755065 am
UUID: 78267d62-77c5-8c48-87c3-81525301c8b4
Ancestors: Morphic-mt.1759

Fixes a regression for "re-use windows" in smart search. Thanks Christoph (ct)!

=============== Diff against Morphic-mt.1759 ===============

Item was changed:
  ----- Method: SearchBar>>smartSearch:in: (in category 'searching') -----
  smartSearch: text in: morph
  "Take the user input and perform an appropriate search"
  | input newContents |
  self removeResultsWidget.
  input := text asString ifEmpty:[^self].
  self class useSmartSearch ifFalse: [^ ToolSet default browseMessageNames: input].
 
  (Symbol lookup: input) ifNotNil:
  [:symbol| input := symbol].
  "If it is a global or a full class name, browse that class."
  (Smalltalk bindingOf: input) ifNotNil:
  [:assoc| | class |
  class := (assoc value isBehavior ifTrue:[assoc value] ifFalse:[assoc value class]) theNonMetaClass.
+ ^ToolSet browseClass: class].
- Project current world submorphs do:
- [:windowMorph|
- (windowMorph isSystemWindow
-  and: [(windowMorph model isKindOf: Browser)
-  and: [windowMorph model isDisplayingClass: class]]) ifTrue:
- [windowMorph beKeyWindow.
- ^windowMorph model displayClass: class]].
- ^ToolSet browse: class selector: nil].
 
  "If it is a symbol and there are implementors of it, browse those implementors."
  input isSymbol ifTrue:
  [(SystemNavigation new allImplementorsOf: input) ifNotEmpty:
  [:list|
  ^SystemNavigation new
  browseMessageList: list
  name: 'Implementors of ' , input]].
 
  "If it starts uppercase, browse classes if any. Otherwise, just search for messages."
  input first isUppercase ifTrue:
  [(UIManager default classFromPattern: input withCaption: '') ifNotNil:
  [:aClass| ^ToolSet browse: aClass selector: nil].
  newContents := input, ' -- not found.'.
  self searchTerm: newContents.
  self selection: (input size+1 to: newContents size).
  self currentHand newKeyboardFocus: morph textMorph.
  ^ self].
 
  "Default to browse message names..."
  ToolSet default browseMessageNames: input!