Using GTSpotter how do I find an implementor of #accept ?

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

Using GTSpotter how do I find an implementor of #accept ?

Paul DeBruicker
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?  


Thanks


Paul
Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Nicolai Hess


2015-06-10 7:39 GMT+02:00 Paul DeBruicker <[hidden email]>:
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

Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Paul DeBruicker
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?





Nicolai Hess wrote
2015-06-10 7:39 GMT+02:00 Paul DeBruicker <[hidden email]>:

> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Nicolai Hess


2015-06-10 16:24 GMT+02:00 Paul DeBruicker <[hidden email]>:
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 &lt;

> pdebruic@

> &gt;:
>
>> 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.


Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Paul DeBruicker

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 <[hidden email]>:

> 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.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Tudor Girba-2
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 <[hidden email]> 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 &lt;

> pdebruic@

> &gt;:
>
>> 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 &lt;
>>
>> > pdebruic@
>>
>> > &gt;:
>> >
>> >> 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.




--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Paul DeBruicker
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 <[hidden email]> 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"
Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Ben Coman
On Thu, Jun 11, 2015 at 1:05 PM, Paul DeBruicker <[hidden email]> wrote:
> 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

I believe that was called Spotlight.
cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Nicolai Hess
In reply to this post by Paul DeBruicker


2015-06-11 7:05 GMT+02:00 Paul DeBruicker <[hidden email]>:
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 miss spotlight for this fast accurate search too.
It is much easier to type a message (like accept) and hit enter and
you get a MessageList/Browser with that result.
Instead, in spotter, you have to
- scroll through the list of all other search results (like classes)
- dive in the list of all implementors
- scroll again
and no easy way to open a message list with all implementors.

But:
It is MUCH easier to configure or extent Spotter
(if you understand the badly documented concepts behind).

Spotter is not a perfect replacement for Spotlight, but spotlight
wasn't perfect/accurate too.
For example, search for String and you got all possible classes or
methods with String in its name but NOT the class String itself,
(not even if you scroll down, because the search result includes
only 100 entries).
There are often symbols in the resultlist that aren't messages
at all and if you select that result you get
"There are no imiplementors of ..." this annoyed me a lot.
I fixed some of the problems with spotlight but doing this
for spottter is much cleaner and easier.

 


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?

"Why was it decided that ..."
no decision, it was implemented successive to catch up with old spotlight.
missing features were added afterwards (like search for globals and class vars)
any missing feauter ? -> open an issue ( and or contribute a fix)


 


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 &lt;

> pdebruic@

> &gt; 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 &lt;
>>
>> > pdebruic@
>>
>> > &gt;:
>> >
>> >> 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 &lt;
>> >>
>> >> > pdebruic@
>> >>
>> >> > &gt;:
>> >> >
>> >> >> 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.


Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Tudor Girba-2
In reply to this post by Paul DeBruicker
Hi Paul,

Let's take it from the beginning. Spotter is a completely new tool whose goal is to help you find all sorts of objects. See here some more detailed explanations:

Although the tool looks simple, it implied a rather extensive effort. As a consequence some features did not make it until the Pharo4 release. One of these features is a proper results sorting mechanism.

So, it's not that someone decided that the order should now be different. It's more that proper ordering did not make it in the release, and this impacts the implementors case more often.

But, if you want to play with a different strategy, here is an example to start from. One thing that the current Implementors processor does is to show the actual methods. This works well in many cases, but there were people that preferred to search for selectors instead and then get the list of all methods. To achieve this, try the following:

Compile this method:

GTSpotter>>spotterSelectorsFor: aStep
    <spotterOrder: 29>
aStep listProcessor
title: 'Selectors';
filter: GTFilterSubstring item: [ :filter :context | 
SystemNavigation default allBehaviorsDo: [ :class | class selectorsDo: filter ] ];
actLogic: [ :each | self systemNavigation browseAllImplementorsOf: each ]

Then type accept, and click on a result and you will get the implementors browser. This is just an example to help you get started with customizing Spotter, and it is not the experience we want to promote. Instead, we should be able to dive in a selector and see the concrete implementors within Spotter.

Cheers,
Doru


On Thu, Jun 11, 2015 at 7:05 AM, Paul DeBruicker <[hidden email]> wrote:
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 &lt;

> pdebruic@

> &gt; 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 &lt;
>>
>> > pdebruic@
>>
>> > &gt;:
>> >
>> >> 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 &lt;
>> >>
>> >> > pdebruic@
>> >>
>> >> > &gt;:
>> >> >
>> >> >> 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.




--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

stepharo
In reply to this post by Nicolai Hess
I still do not get why a tool like spotter does not focus first one working on the key scenarios we all want:
    - sender
    - implementor
    - open a class
    - class refs

Because this is what we do 95% of the time.

Le 11/6/15 09:38, Nicolai Hess a écrit :


2015-06-11 7:05 GMT+02:00 Paul DeBruicker <[hidden email]>:
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 miss spotlight for this fast accurate search too.
It is much easier to type a message (like accept) and hit enter and
you get a MessageList/Browser with that result.
Instead, in spotter, you have to
- scroll through the list of all other search results (like classes)
- dive in the list of all implementors
- scroll again
and no easy way to open a message list with all implementors.

But:
It is MUCH easier to configure or extent Spotter
(if you understand the badly documented concepts behind).

Spotter is not a perfect replacement for Spotlight, but spotlight
wasn't perfect/accurate too.
For example, search for String and you got all possible classes or
methods with String in its name but NOT the class String itself,
(not even if you scroll down, because the search result includes
only 100 entries).
There are often symbols in the resultlist that aren't messages
at all and if you select that result you get
"There are no imiplementors of ..." this annoyed me a lot.
I fixed some of the problems with spotlight but doing this
for spottter is much cleaner and easier.

 


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?

"Why was it decided that ..."
no decision, it was implemented successive to catch up with old spotlight.
missing features were added afterwards (like search for globals and class vars)
any missing feauter ? -> open an issue ( and or contribute a fix)


 


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 &lt;

> pdebruic@

> &gt; 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 &lt;
>>
>> > pdebruic@
>>
>> > &gt;:
>> >
>> >> 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 &lt;
>> >>
>> >> > pdebruic@
>> >>
>> >> > &gt;:
>> >> >
>> >> >> 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.



Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Peter Uhnak
On Fri, Feb 19, 2016 at 5:38 PM, stepharo <[hidden email]> wrote:
I still do not get why a tool like spotter does not focus first one working on the key scenarios we all want:
    - sender
    - implementor
    - open a class
    - class refs

Because this is what we do 95% of the time.

Spotter has statistics so it would be interesting what they say, because for me the key scenarios is:

* find a method/implementor
* find a class

Finding senders or class refs is so much easier from Nautilus… just a keypress and no need to type name.
Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Paul DeBruicker
In reply to this post by stepharo
+1

At this point I just keep a Workspace open to type what I'm looking for in and hit cmd+m or n or N or B. Instead of shift+end I hit opt+tab to find the Workspace. Not as convenient as shift+Enter but the problems in outlined in this message are gone.  Its probably possible to remap shift+enter to open/surface the Workspace for me.  


I don't use a Playground for that because there is something weird sometimes when text is highlighted and deleted.  You can find yourself in a situation where there is a one char wide space highlighted and everything you type goes into that space.



I like to think I've always understood Doru's point that Spotter is a tool for finding objects.   The code lookup/open browser functionality is secondary to the designed intent.







stepharo wrote
I still do not get why a tool like spotter does not focus first one
working on the key scenarios we all want:
     - sender
     - implementor
     - open a class
     - class refs

Because this is what we do 95% of the time.

Le 11/6/15 09:38, Nicolai Hess a écrit :
>
>
> 2015-06-11 7:05 GMT+02:00 Paul DeBruicker <[hidden email] 
> <mailto:[hidden email]>>:
>
>     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 miss spotlight for this fast accurate search too.
> It is much easier to type a message (like accept) and hit enter and
> you get a MessageList/Browser with that result.
> Instead, in spotter, you have to
> - scroll through the list of all other search results (like classes)
> - dive in the list of all implementors
> - scroll again
> and no easy way to open a message list with all implementors.
>
> But:
> It is MUCH easier to configure or extent Spotter
> (if you understand the badly documented concepts behind).
>
> Spotter is not a perfect replacement for Spotlight, but spotlight
> wasn't perfect/accurate too.
> For example, search for String and you got all possible classes or
> methods with String in its name but NOT the class String itself,
> (not even if you scroll down, because the search result includes
> only 100 entries).
> There are often symbols in the resultlist that aren't messages
> at all and if you select that result you get
> "There are no imiplementors of ..." this annoyed me a lot.
> I fixed some of the problems with spotlight but doing this
> for spottter is much cleaner and easier.
>
>
>
>     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?
>
>
> "Why was it decided that ..."
> no decision, it was implemented successive to catch up with old spotlight.
> missing features were added afterwards (like search for globals and
> class vars)
> any missing feauter ? -> open an issue ( and or contribute a fix)
>
>
>
>
>     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 <http://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.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

stepharo
In reply to this post by Tudor Girba-2
How from this explanation can I get what is the # that I should type to get implementors?
Because I got the same problem with the help.

Stef


Le 11/6/15 17:08, Tudor Girba a écrit :
Hi Paul,

Let's take it from the beginning. Spotter is a completely new tool whose goal is to help you find all sorts of objects. See here some more detailed explanations:

Although the tool looks simple, it implied a rather extensive effort. As a consequence some features did not make it until the Pharo4 release. One of these features is a proper results sorting mechanism.

So, it's not that someone decided that the order should now be different. It's more that proper ordering did not make it in the release, and this impacts the implementors case more often.

But, if you want to play with a different strategy, here is an example to start from. One thing that the current Implementors processor does is to show the actual methods. This works well in many cases, but there were people that preferred to search for selectors instead and then get the list of all methods. To achieve this, try the following:

Compile this method:

GTSpotter>>spotterSelectorsFor: aStep
    <spotterOrder: 29>
aStep listProcessor
title: 'Selectors';
filter: GTFilterSubstring item: [ :filter :context | 
SystemNavigation default allBehaviorsDo: [ :class | class selectorsDo: filter ] ];
actLogic: [ :each | self systemNavigation browseAllImplementorsOf: each ]

Then type accept, and click on a result and you will get the implementors browser. This is just an example to help you get started with customizing Spotter, and it is not the experience we want to promote. Instead, we should be able to dive in a selector and see the concrete implementors within Spotter.

Cheers,
Doru


On Thu, Jun 11, 2015 at 7:05 AM, Paul DeBruicker <[hidden email]> wrote:
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 &lt;

> pdebruic@

> &gt; 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 &lt;
>>
>> > pdebruic@
>>
>> > &gt;:
>> >
>> >> 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 &lt;
>> >>
>> >> > pdebruic@
>> >>
>> >> > &gt;:
>> >> >
>> >> >> 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.




--

"Every thing has its own flow"

Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

Tudor Girba-2
Hi,

Thanks for looking at this.

I tried to explain it here:
http://www.humane-assessment.com/blog/scoping-for-specific-search-category-in-gtspotter/

and more recently here:
http://www.humane-assessment.com/blog/spotting-senders-references-with-gtspotter

Let me try again in a different way.

The help lists:

GTSpotter
- Examples (gtSpotterExamplesFor:)
- Catalog Projects (spotterCatalogProjectsFor:)
- Clipboard History (spotterClipboardFor:)
- Methods (spotterConcreteMethodFor:)
- Dirty Monticello packages (spotterDirtyMonticelloPackagesFor:)
- Playground cached pages (spotterForCachedPlaygroundPagesFor:)
- Classes (spotterForClassesFor:)
- Directories (spotterForDirectoriesFor:)
- Calculator (spotterForExpressionsFor:)
- Files (spotterForFilesFor:)
- Global variables (spotterForGlobalVarsFor:)
- Help topics (spotterForHelpTopicFor:)
- Messages (spotterForMessagesFor:)
- Metacello Configurations (spotterForMetacelloConfigurationsFor:)
- Packages (spotterForPackagesFor:)
- Pragmas (spotterForPragmasFor:)
- References (spotterForReferencesFor:)
- Monticello Repositories (spotterForRepositoriesFor:)
- Senders (spotterForSendersFor:)
- spotterForStashedPlaygroundPagesFor: (spotterForStashedPlaygroundPagesFor:)
- History (spotterHistoryFor:)
- Implementors (spotterImplementorsFor:)
- Moose Models (spotterMooseModelsFor:)
- ws.stfx.eu (spotterStfxFor:)
- Menu (spotterWorldMenuFor:)

All of these, can be used with #. For example "Zinc #catalog" will give you only the results matched by the "Catalog Projects” processor. Or, "Mon #men” will give you the results from the “Menu” processor only.

Does this make sense now?

Cheers,
Doru


> On Feb 20, 2016, at 3:26 PM, stepharo <[hidden email]> wrote:
>
> How from this explanation can I get what is the # that I should type to get implementors?
> Because I got the same problem with the help.
>
> Stef
>
>
> Le 11/6/15 17:08, Tudor Girba a écrit :
>> Hi Paul,
>>
>> Let's take it from the beginning. Spotter is a completely new tool whose goal is to help you find all sorts of objects. See here some more detailed explanations:
>> http://www.humane-assessment.com/blog/introducing-gtspotter/
>> http://www.humane-assessment.com/blog/boosting-gtspotter-with-preview/
>> http://www.humane-assessment.com/blog/finding-asclass-usages-in-glamour-using-gtspotter/
>> http://www.humane-assessment.com/blog/searching-file-system-with-gtspotter/
>> http://www.humane-assessment.com/blog/scoping-for-specific-search-category-in-gtspotter/
>>
>> Although the tool looks simple, it implied a rather extensive effort. As a consequence some features did not make it until the Pharo4 release. One of these features is a proper results sorting mechanism.
>>
>> So, it's not that someone decided that the order should now be different. It's more that proper ordering did not make it in the release, and this impacts the implementors case more often.
>>
>> But, if you want to play with a different strategy, here is an example to start from. One thing that the current Implementors processor does is to show the actual methods. This works well in many cases, but there were people that preferred to search for selectors instead and then get the list of all methods. To achieve this, try the following:
>>
>> Compile this method:
>>
>> GTSpotter>>spotterSelectorsFor: aStep
>>     <spotterOrder: 29>
>> aStep listProcessor
>> title: 'Selectors';
>> filter: GTFilterSubstring item: [ :filter :context |
>> SystemNavigation default allBehaviorsDo: [ :class | class selectorsDo: filter ] ];
>> actLogic: [ :each | self systemNavigation browseAllImplementorsOf: each ]
>>
>> Then type accept, and click on a result and you will get the implementors browser. This is just an example to help you get started with customizing Spotter, and it is not the experience we want to promote. Instead, we should be able to dive in a selector and see the concrete implementors within Spotter.
>>
>> Cheers,
>> Doru
>>
>>
>> On Thu, Jun 11, 2015 at 7:05 AM, Paul DeBruicker <[hidden email]> wrote:
>> 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 &lt;
>>
>> > pdebruic@
>>
>> > &gt; 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 &lt;
>> >>
>> >> > pdebruic@
>> >>
>> >> > &gt;:
>> >> >
>> >> >> 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 &lt;
>> >> >>
>> >> >> > pdebruic@
>> >> >>
>> >> >> > &gt;:
>> >> >> >
>> >> >> >> 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.
>>
>>
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>

--
www.tudorgirba.com
www.feenk.com

"Some battles are better lost than fought."





Reply | Threaded
Open this post in threaded view
|

Re: Using GTSpotter how do I find an implementor of #accept ?

stepharo
ok you are saying that

- Examples (gtSpotterExamplesFor:)

is magically turned into #examples

You should write it in the help because we cannot guess it.

Le 20/2/16 15:44, Tudor Girba a écrit :

> Hi,
>
> Thanks for looking at this.
>
> I tried to explain it here:
> http://www.humane-assessment.com/blog/scoping-for-specific-search-category-in-gtspotter/
>
> and more recently here:
> http://www.humane-assessment.com/blog/spotting-senders-references-with-gtspotter
>
> Let me try again in a different way.
>
> The help lists:
>
> GTSpotter
> - Examples (gtSpotterExamplesFor:)
> - Catalog Projects (spotterCatalogProjectsFor:)
> - Clipboard History (spotterClipboardFor:)
> - Methods (spotterConcreteMethodFor:)
> - Dirty Monticello packages (spotterDirtyMonticelloPackagesFor:)
> - Playground cached pages (spotterForCachedPlaygroundPagesFor:)
> - Classes (spotterForClassesFor:)
> - Directories (spotterForDirectoriesFor:)
> - Calculator (spotterForExpressionsFor:)
> - Files (spotterForFilesFor:)
> - Global variables (spotterForGlobalVarsFor:)
> - Help topics (spotterForHelpTopicFor:)
> - Messages (spotterForMessagesFor:)
> - Metacello Configurations (spotterForMetacelloConfigurationsFor:)
> - Packages (spotterForPackagesFor:)
> - Pragmas (spotterForPragmasFor:)
> - References (spotterForReferencesFor:)
> - Monticello Repositories (spotterForRepositoriesFor:)
> - Senders (spotterForSendersFor:)
> - spotterForStashedPlaygroundPagesFor: (spotterForStashedPlaygroundPagesFor:)
> - History (spotterHistoryFor:)
> - Implementors (spotterImplementorsFor:)
> - Moose Models (spotterMooseModelsFor:)
> - ws.stfx.eu (spotterStfxFor:)
> - Menu (spotterWorldMenuFor:)
>
> All of these, can be used with #. For example "Zinc #catalog" will give you only the results matched by the "Catalog Projects” processor. Or, "Mon #men” will give you the results from the “Menu” processor only.
>
> Does this make sense now?
>
> Cheers,
> Doru
>
>
>> On Feb 20, 2016, at 3:26 PM, stepharo <[hidden email]> wrote:
>>
>> How from this explanation can I get what is the # that I should type to get implementors?
>> Because I got the same problem with the help.
>>
>> Stef
>>
>>
>> Le 11/6/15 17:08, Tudor Girba a écrit :
>>> Hi Paul,
>>>
>>> Let's take it from the beginning. Spotter is a completely new tool whose goal is to help you find all sorts of objects. See here some more detailed explanations:
>>> http://www.humane-assessment.com/blog/introducing-gtspotter/
>>> http://www.humane-assessment.com/blog/boosting-gtspotter-with-preview/
>>> http://www.humane-assessment.com/blog/finding-asclass-usages-in-glamour-using-gtspotter/
>>> http://www.humane-assessment.com/blog/searching-file-system-with-gtspotter/
>>> http://www.humane-assessment.com/blog/scoping-for-specific-search-category-in-gtspotter/
>>>
>>> Although the tool looks simple, it implied a rather extensive effort. As a consequence some features did not make it until the Pharo4 release. One of these features is a proper results sorting mechanism.
>>>
>>> So, it's not that someone decided that the order should now be different. It's more that proper ordering did not make it in the release, and this impacts the implementors case more often.
>>>
>>> But, if you want to play with a different strategy, here is an example to start from. One thing that the current Implementors processor does is to show the actual methods. This works well in many cases, but there were people that preferred to search for selectors instead and then get the list of all methods. To achieve this, try the following:
>>>
>>> Compile this method:
>>>
>>> GTSpotter>>spotterSelectorsFor: aStep
>>>      <spotterOrder: 29>
>>> aStep listProcessor
>>> title: 'Selectors';
>>> filter: GTFilterSubstring item: [ :filter :context |
>>> SystemNavigation default allBehaviorsDo: [ :class | class selectorsDo: filter ] ];
>>> actLogic: [ :each | self systemNavigation browseAllImplementorsOf: each ]
>>>
>>> Then type accept, and click on a result and you will get the implementors browser. This is just an example to help you get started with customizing Spotter, and it is not the experience we want to promote. Instead, we should be able to dive in a selector and see the concrete implementors within Spotter.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On Thu, Jun 11, 2015 at 7:05 AM, Paul DeBruicker <[hidden email]> wrote:
>>> 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 &lt;
>>>> pdebruic@
>>>> &gt; 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 &lt;
>>>>>> pdebruic@
>>>>>> &gt;:
>>>>>>
>>>>>>> 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 &lt;
>>>>>>>> pdebruic@
>>>>>>>> &gt;:
>>>>>>>>
>>>>>>>>> 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.
>>>
>>>
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Every thing has its own flow"
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Some battles are better lost than fought."
>
>
>
>
>
>