Hi Doru, By "the old version of Spotter" I meant whatever was in Pharo 3 that would produce a list of search results with exact matches at the top when I'd hit shift+enter and then type e.g. 'accept.' Sorry to have said "Pharo 4" & been unnecessarily confusing.
I'm just going to use 'accept' for this example but why show the mixed list of 637 implementors of accept* and not lead with "accept". Why was it decided that inexact matches to the typed input be privileged above exact matches in the new tool? Is it a bad Levenshtein distance algorithm or something? Thanks for helping me figure it out Paul Tudor Girba-2 wrote > Hi, > > What do you mean by the old version of Spotter? > > Just in case: you should know that Spotter is made to be extensible. This > means that if you want to play with your own way of searching for objects, > you can just do it. Let me know if you to try and if you need help in this > direction. > > Cheers, > Doru > > > > On Wed, Jun 10, 2015 at 9:10 PM, Paul DeBruicker < > pdebruic@ > > wrote: > >> >> Is there any way to change back to the old version of Spotter in Pharo 4? >> >> >> >> >> >> Nicolai Hess wrote >> > 2015-06-10 16:24 GMT+02:00 Paul DeBruicker < >> >> > pdebruic@ >> >> > >: >> > >> >> So by default the search tool is only guaranteed to return an exact >> term >> >> match if there are only less than 5 non-exact match results? >> >> >> >> >> > Yes >> > >> > >> > >> > >> >> >> >> >> >> >> >> >> >> >> >> Nicolai Hess wrote >> >> > 2015-06-10 7:39 GMT+02:00 Paul DeBruicker < >> >> >> >> > pdebruic@ >> >> >> >> > >: >> >> > >> >> >> when I hit shift+enter and type 'accept' I get things that are not >> >> >> #accept, e.g. #accept: and AbstractAcceptor. >> >> >> >> >> >> If I add a space after accept it doesn't help. >> >> >> >> >> >> >> >> >> What do I not understand? >> >> >> >> >> > >> >> > the result list is not sorted and the result list is built by all >> >> methods >> >> > having the query string as part >> >> > of its selector name. >> >> > >> >> > Yes this can be improved and it is not difficult, for example you >> can >> >> add >> >> > this method to >> >> > >> >> > GTFilterImplementor>>applyFilterWithQuery >> >> > super applyFilterWithQuery. >> >> > items sort: [ :a :b | (self itemFilterNameFor: a) size < (self >> >> > itemFilterNameFor: b) size ] >> >> > >> >> > this will sort the result list by the size of the selector name. So, >> if >> >> > there is a perfect match, >> >> > it will be listed first. >> >> > (BUT only in the implementors category if you "dive-in", not in the >> >> > 5-elements-result-preview-list). >> >> > >> >> > Maybe there is a better way without sorting. (We can modify >> >> > applyFilterWithQuery for the implementors >> >> > filter, to put perfect matches at the begining of the list). >> >> > >> >> > But all this is not easy to discover. Spotter classes make some >> heavy >> >> use >> >> > of delegation, many operations >> >> > are split and delgated to subclasses (GOOD!) >> >> > many classes aren't documented (BAD!) and this makes it really >> >> difficult >> >> > to >> >> > catch how all this is supposed to work together. >> >> > >> >> > >> >> > nicolai >> >> > >> >> > >> >> > >> >> > >> >> >> >> >> >> >> >> >> Thanks >> >> >> >> >> >> >> >> >> Paul >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> View this message in context: >> >> >> http://forum.world.st/Using-GTSpotter-how-do-I-find-an-implementor-of-accept-tp4831299p4831428.html >> >> Sent from the Pharo Smalltalk Users mailing list archive at >> Nabble.com. >> >> >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Using-GTSpotter-how-do-I-find-an-implementor-of-accept-tp4831299p4831506.html >> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. >> >> > > > -- > www.tudorgirba.com > > "Every thing has its own flow" -- View this message in context: http://forum.world.st/Using-GTSpotter-how-do-I-find-an-implementor-of-accept-tp4831299p4831566.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
