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

Eliot Miranda eliot.miranda at gmail.com
Fri Jun 2 23:53:51 UTC 2017


On Fri, Jun 2, 2017 at 3:34 PM, Chris Muller <asqueaker at gmail.com> wrote:

> Ah, for a moment I thought you added it to "senders".
>

It's specifically there so that inst var accesses are browsed as well as
senders of the accessor, not just the accessor.  What used to happen is
that if you selected an inst var and did "browse it" you;d only get senders
of the inst var if it was a message selector.  Not that useful given
"senders".

>
>
> On Fri, Jun 2, 2017 at 5:04 PM, Eliot Miranda <eliot.miranda at gmail.com>
> wrote:
> > Hi Chris,
> >
> > On Fri, Jun 2, 2017 at 2:12 PM, Chris Muller <asqueaker at gmail.com>
> wrote:
> >>
> >> Hey Eliot,
> >>
> >> "Senders" refers to message-sends only, where as variable references are
> >> browsed using the "browse references" command, (Command+Shift+N), which
> >> does work for browsing references to inst-vars.
> >
> >
> > Some users prefer the "browse it" (Apple-b,Alt-b) command, which is
> achieved
> > by disabling "alternate browse it", in which case the below is operative.
> >
> >>
> >>
> >> Best.
> >>
> >> On Thu, Jun 1, 2017 at 3:22 PM,  <commits at source.squeak.org> wrote:
> >> > Eliot Miranda uploaded a new version of Morphic to project The Trunk:
> >> > http://source.squeak.org/trunk/Morphic-eem.1340.mcz
> >> >
> >> > ==================== Summary ====================
> >> >
> >> > Name: Morphic-eem.1340
> >> > Author: eem
> >> > Time: 1 June 2017, 1:21:49.04056 pm
> >> > UUID: 6117ed97-d114-454b-a38c-b35edc306c14
> >> > Ancestors: Morphic-eem.1339
> >> >
> >> > Fix browseIt so that accesses to a selected inst var are browsed, not
> >> > just senders of the accessor.  Needs alternateBrowseIt preference
> disabled.
> >> >
> >> > =============== Diff against Morphic-eem.1339 ===============
> >> >
> >> > Item was changed:
> >> >   ----- Method: TextEditor>>browseIt (in category 'menu messages')
> -----
> >> >   browseIt
> >> >         "Launch a browser for the current selection, if appropriate"
> >> >
> >> > +       | aSymbol anEntry brow maybeBrowseInstVar |
> >> > -       | aSymbol anEntry brow |
> >> >
> >> >         Preferences alternativeBrowseIt ifTrue: [^ self
> >> > browseClassFromIt].
> >> >
> >> >         self lineSelectAndEmptyCheck: [^ self].
> >> > -       (aSymbol := self selectedSymbol) isNil ifTrue: [^ morph
> flash].
> >> >
> >> > +       maybeBrowseInstVar :=
> >> > +               [| selectionString |
> >> > +               selectionString := self selection asString.
> >> > +                ([model selectedClass] on: Error do: [:ex|])
> ifNotNil:
> >> > +                       [:class|
> >> > +                       (class allInstVarNames includes:
> >> > selectionString) ifTrue:
> >> > +                               [self systemNavigation
> >> > +                                       browseAllAccessesTo:
> >> > selectionString
> >> > +                                       from: (class
> >> > classThatDefinesInstanceVariable: selectionString).
> >> > +                                ^nil]]].
> >> > +
> >> > +       (aSymbol := self selectedSymbol) ifNil:
> >> > +               [maybeBrowseInstVar value.
> >> > +                ^morph flash].
> >> > +
> >> >         aSymbol first isUppercase
> >> >                 ifTrue:
> >> >                         [anEntry := (model environment
> >> >                                 valueOf: aSymbol
> >> >                                 ifAbsent:
> >> >                                         [ self systemNavigation
> >> > browseAllImplementorsOf: aSymbol.
> >> >                                         ^ nil]).
> >> >                         anEntry ifNil: [^ morph flash].
> >> > +                       (anEntry isBehavior and: [anEntry name ==
> >> > aSymbol]) ifFalse: "When is this ever false?"
> >> > +                               [anEntry := anEntry class].
> >> > -                       (anEntry isKindOf: Class)
> >> > -                               ifFalse:        [anEntry := anEntry
> >> > class].
> >> >                         brow := SystemBrowser default new.
> >> >                         brow setClass: anEntry selector: nil.
> >> >                         brow class
> >> >                                 openBrowserView: (brow openEditString:
> >> > nil)
> >> >                                 label: 'System Browser']
> >> >                 ifFalse:
> >> > +                       [self systemNavigation
> browseAllImplementorsOf:
> >> > aSymbol.
> >> > +                        maybeBrowseInstVar value]!
> >> > -                       [self systemNavigation
> browseAllImplementorsOf:
> >> > aSymbol]!
> >> >
> >> >
> >>
> >
> >
> >
> > --
> > _,,,^..^,,,_
> > best, Eliot
> >
> >
> >
>
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170602/f1db6cb3/attachment.html>


More information about the Squeak-dev mailing list