[squeak-dev] The Trunk: Morphic-eem.1719.mcz

Chris Muller asqueaker at gmail.com
Fri Feb 5 21:19:13 UTC 2021


Hi Christoph!

I thought this feature seemed reminiscent of Reuse Windows as well.  The
method to hook in each Model subclass (as needed) is
#representsSameBrowseeAs:.  Looking at that, you can see that simply making
your code pane temporarily dirty, an additional window will be spawned.  I
mention that because Reuse Windows is fantastic and I hate to see
your experience with it ruined over something so trivial.  :)

You do also have the green duplicate halo.  People are happy to use
"non-standard" UI features in other IDE's, but there seems to be an
aversion to people using halos in Squeak.  I could be wrong about that, but
I find the duplicate halo useful quite often.

 - Chris

On Thu, Feb 4, 2021 at 7:14 PM Thiede, Christoph <
Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:

> Hi Eliot,
>
>
> could you please honor the "SystemWindow reuseWindows" here? I have
> turned that preference off in my image because I actually use to accept a
> class name multiple times in the search bar in order to open multiple
> windows - for instance, to view different protocols of the same
> class side-by-side. It would be great if this would work soon again ... :-)
>
>
> Best,
>
> Christoph
> ------------------------------
> *Von:* Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im
> Auftrag von commits at source.squeak.org <commits at source.squeak.org>
> *Gesendet:* Donnerstag, 4. Februar 2021 03:38:15
> *An:* squeak-dev at lists.squeakfoundation.org;
> packages at lists.squeakfoundation.org
> *Betreff:* [squeak-dev] The Trunk: Morphic-eem.1719.mcz
>
> Eliot Miranda uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-eem.1719.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-eem.1719
> Author: eem
> Time: 3 February 2021, 6:38:11.11355 pm
> UUID: ffb981b1-7c53-4fbe-b6f4-4c8f27c79f5a
> Ancestors: Morphic-mt.1718
>
> Make SearchBar>>#smartSearch:in: search existing browsers for a class name
> being searched for, bringing the first such browser to the front and
> selecting the class.  This allows one to find classes in browsers either
> when one has very many, or when one is using multi-window browsers
> containing many many classes.
>
> =============== Diff against Morphic-mt.1718 ===============
>
> Item was added:
> + ----- Method: Browser>>displayClass: (in category
> '*Morphic-Menus-DockingBar-accessing') -----
> + displayClass: aClass
> +        "Assuming the receiver has answered true to isDisplayingClass:,
> come to the front and select the given class."
> +        | index |
> +        index := self multiWindowIndexForClassName: aClass.
> +        index  ~= 0 ifTrue:
> +                [multiWindowState selectWindowIndex: index].
> +        self selectClass: aClass!
>
> Item was added:
> + ----- Method: Browser>>isDisplayingClass: (in category
> '*Morphic-Menus-DockingBar-accessing') -----
> + isDisplayingClass: aClass
> +        | className |
> +        className := aClass name.
> +        (self multiWindowIndexForClassName: className) ~= 0 ifTrue:
> [^true].
> +        ^selectedClassName = className!
>
> Item was added:
> + ----- Method: Browser>>multiWindowIndexForClassName: (in category
> '*Morphic-Menus-DockingBar-accessing') -----
> + multiWindowIndexForClassName: className
> +        "Answer the index of a browser displaying className in
> multiWindowState, if any.
> +         Otherwise answer zero."
> +        multiWindowState ifNil: [^0].
> +        multiWindowState models withIndexDo:
> +                [:browser :index|
> +                browser selectedClassName = className ifTrue: [^index]].
> +        ^0!
>
> 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 findInterned: 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.
> +                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].
> -        (Smalltalk bindingOf: input) ifNotNil:[:assoc| | global |
> -                global := assoc value.
> -                ^ToolSet browse: (global isBehavior ifTrue:[global]
> ifFalse:[global class]) selector: nil].
>
>          "If it is a symbol and there are implementors of it, browse those
> implementors."
>          Symbol hasInterned: input ifTrue: [:selector |
>                  (SystemNavigation new allImplementorsOf: selector)
> 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!
> -        input first isUppercase
> -                ifTrue: [
> -                        (UIManager default classFromPattern: input
> withCaption: '')
> -                                ifNotNil:[:aClass| ^ToolSet browse:
> aClass selector: nil]
> -                                ifNil: [
> -                                        newContents := input, ' -- not
> found.'.
> -                                        self searchTerm: newContents.
> -                                        self selection: (input size+1 to:
> newContents size).
> -                                        self currentHand
> newKeyboardFocus: morph textMorph.
> -                                        ^ self]]
> -                ifFalse: [
> -                        ToolSet default browseMessageNames: input].!
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210205/cb24a317/attachment.html>


More information about the Squeak-dev mailing list