[spotter] How do I get all the pragmas of the system?
Hi, This is not provided because that search is too expensive to happen by default. Take a look at the current implementation: GTSpotter>>spotterForPragmasFor: aStep <spotterOrder: 40> aStep listProcessor allCandidates: [ PragmaType all ]; title: 'Pragmas'; itemName: [ :pragma | pragma keyword ]; filter: GTFilterSubstring; wantsToDisplayOnEmptyQuery: false The last statement says that you have to have a query to start the search. And because it is implemented using as a substring filter, you will only get something when you have a letter in the search. Now, if you want to have a full text search option, for example using string match patterns, you can do this: GTSpotter>>spotterForPragmasFor: aStep <spotterOrder: 40> aStep listProcessor allCandidates: [ PragmaType all ]; title: 'Pragmas'; itemName: [ :pragma | pragma keyword ]; filter: GTFilterStringMatch; wantsToDisplayOnEmptyQuery: false Now, if you type #pragma * you get all pragmas The StringMatch is slower than the Substring and that is why we do not use it by default. We still would like to work on a more unified search strategy, but we did not get to it. Perhaps someone else could propose something. Cheers, Doru
On May 21, 2016, at 8:41 AM, stepharo <stepharo@free.fr> wrote:
How do I get all the pragmas of the system with Spotter?
-- www.tudorgirba.com www.feenk.com "We cannot reach the flow of things unless we let go."
thanks I notice that I could not get it either with finder and I found a bug into finder and regex :) Le 21/5/16 à 09:16, Tudor Girba a écrit :
Hi,
This is not provided because that search is too expensive to happen by default.
Take a look at the current implementation:
GTSpotter>>spotterForPragmasFor: aStep <spotterOrder: 40> aStep listProcessor allCandidates: [ PragmaType all ]; title: 'Pragmas'; itemName: [ :pragma | pragma keyword ]; filter: GTFilterSubstring; *wantsToDisplayOnEmptyQuery: false*
The last statement says that you have to have a query to start the search. And because it is implemented using as a substring filter, you will only get something when you have a letter in the search.
Now, if you want to have a full text search option, for example using string match patterns, you can do this:
GTSpotter>>spotterForPragmasFor: aStep <spotterOrder: 40> aStep listProcessor allCandidates: [ PragmaType all ]; title: 'Pragmas'; itemName: [ :pragma | pragma keyword ]; *filter: GTFilterStringMatch;* wantsToDisplayOnEmptyQuery: false
Now, if you type #pragma * you get all pragmas
The StringMatch is slower than the Substring and that is why we do not use it by default. We still would like to work on a more unified search strategy, but we did not get to it. Perhaps someone else could propose something.
Cheers, Doru
On May 21, 2016, at 8:41 AM, stepharo <stepharo@free.fr <mailto:stepharo@free.fr>> wrote:
How do I get all the pragmas of the system with Spotter?
-- www.tudorgirba.com <http://www.tudorgirba.com> www.feenk.com
"We cannot reach the flow of things unless we let go."
participants (2)
-
stepharo -
Tudor Girba