A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-mt.1601.mcz ==================== Summary ==================== Name: Morphic-mt.1601 Author: mt Time: 4 December 2019, 3:14:52.073613 pm UUID: 19583b0d-de7d-45e3-bf18-c4b7b2690b47 Ancestors: Morphic-mt.1600 Proposal: For "implementors of it!" on class bindings or class-var bindings or other global bindings, browse the underlying class of it. For the user's convenience. At the moment, implementors-of-it on such bindings does simply nothing. =============== Diff against Morphic-mt.1600 =============== Item was changed: ----- Method: TextEditor>>implementorsOfIt (in category 'menu messages') ----- implementorsOfIt + "Open an implementors browser on the selected selector or a regular browser if the selection is a class binding." + - "Open an implementors browser on the selected selector" - | aSelector | self lineSelectAndEmptyCheck: [^ self]. + self selectedBinding ifNotNil: + [:binding | ^ self systemNavigation browseClass: binding]. + self selectedSelector ifNotNil: + [:selector | ^ self systemNavigation browseAllImplementorsOf: selector]. + morph flash! - (aSelector := self selectedSelector) == nil ifTrue: [^ morph flash]. - model browseAllImplementorsOf: aSelector! |
Hi Marcel,
> On Dec 4, 2019, at 6:15 AM, [hidden email] wrote: > > A new version of Morphic was added to project The Inbox: > http://source.squeak.org/inbox/Morphic-mt.1601.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.1601 > Author: mt > Time: 4 December 2019, 3:14:52.073613 pm > UUID: 19583b0d-de7d-45e3-bf18-c4b7b2690b47 > Ancestors: Morphic-mt.1600 > > Proposal: For "implementors of it!" on class bindings or class-var bindings or other global bindings, browse the underlying class of it. For the user's convenience. At the moment, implementors-of-it on such bindings does simply nothing. +100 for the functionality. But I would definitely call “browseClass:” something different such as “browseClassOrPoolDefining:”. The binding could be that of a class or of a class/pool variable. browseClass: isn’t a good name and if it just browses classes that are the values of bindings it isn’t that useful. The vm contains a number of pools, the largest of which defines the opcodes in the JIT’s abstract machine. So my WiFi’s is full of bindings other than those that define classes. > =============== Diff against Morphic-mt.1600 =============== > > Item was changed: > ----- Method: TextEditor>>implementorsOfIt (in category 'menu messages') ----- > implementorsOfIt > + "Open an implementors browser on the selected selector or a regular browser if the selection is a class binding." > + > - "Open an implementors browser on the selected selector" > - | aSelector | > self lineSelectAndEmptyCheck: [^ self]. > + self selectedBinding ifNotNil: > + [:binding | ^ self systemNavigation browseClass: binding]. > + self selectedSelector ifNotNil: > + [:selector | ^ self systemNavigation browseAllImplementorsOf: selector]. > + morph flash! > - (aSelector := self selectedSelector) == nil ifTrue: [^ morph flash]. > - model browseAllImplementorsOf: aSelector! > > |
Hey Eliot, take a look at Morphic-mt.1602. Is that more like what you suggested? Best, Marcel
|
In reply to this post by Eliot Miranda-2
-1. I couldn't stand a similar feature in Pharo, where selecting "browse" on something would try really hard to produce "something" if it couldn't find a class, it'd try implementors. "Implementors" is used when I want to trace message flow throug a system, this is _totally different_ than browsing the behaviors of a class. Unifying these two things in the IDE under one command is detrimental. Please don't do it or, if you must, please protect the current function with a preference. Best, Chris On Wed, Dec 4, 2019 at 9:16 AM Eliot Miranda <[hidden email]> wrote: Hi Marcel, |
In reply to this post by marcel.taeumel
I just tried it. I wanted to know if there are any implementors of #var, so I typed it in a workspace, pressed Cmd+m, and up popped an Explorer on SmalltalkEditor. When I select (i)mplementors of a message that has no implementations, I _want_ the system to do do nothing more than that quick, unobtrusive flash. I'm really sorry, but I find it opening a window on something other than what I intended to browse to be very confusing, distracting, and inconvenient. Maybe I'd like it better if it were associated with the "browse" command, since one expects that to produce a class. Definitely not "implementors", though. Best, Chris On Fri, Dec 6, 2019 at 3:53 AM Marcel Taeumel <[hidden email]> wrote:
|
I substantially agree with Chris on this; implementors ought to list implementations of a named message etc. Having a broader list definitely has its uses and should be a separate tool to list any and all references. I'd especially love the magical ability to track back through the blasted registry stuff and places where sneaky tricks like
`Smalltalk at: thisSymbol, thatString` get (mis)used. But please, no more preferences on this sort of thing! We already have at least 10 times as many preferences as is sensible. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful Latin Phrases:- Te precor dulcissime supplex! = Pretty please with a cherry on top! |
In reply to this post by Chris Muller-3
Hi Chris. > I just tried it. I wanted to know if there are any implementors of #var Good catch! So I guess we leave this for a more thorough discussion for after the 5.3 release. That case with "implementors of #var" is really misleading. I totally agree. :-) Best, Marcel
|
Free forum by Nabble | Edit this page |