PackageDescription: Searchlight-Tools


Searchlight - Tools

Last published: November 15, 2011 by 'mlucas-smith'

Defines 10 Classes
Extends 32 Classes


Searchlight-Tools is a search engine inspired by Apple Spotlight for the Smalltalk development environment. It aggregates all the common things you search for - messages, classes, namespaces, packages, bundles, parcels, literals, etc.. in to a single search paradigm with a sophisticated set of search engine backends and criteria rules.

This package adds a tool to the Visual Launcher at the bottom which lets you do a quick search for anything in the image. It also adds an incremental search window which you can open from the Visual Launcher at Browse > Searchlight. Finally, it also integrates in to the Refactoring Browsers Find: toolbar widget.

This package uses the Searchlight package as its search engine backend and it combines and groups the results by type, allowing the user to get a quick glance at 4 high scoring results for each type of thing that we get hits for. If the user wants more hits, they can click on the group name and all results for that group will appear. There is always the option of going < Back if those results aren't what you're looking for too.

Usually you type the prefix of a word you know is in the image, such as part of a class name or method name and Searchlight will do the rest. Weak associative searching also works where the word you're looking for may be in the middle of a name or a partial word. You can also do a special capitals-only search, such as writing MNU which is understood to match the capitals of names, eg: MNU would take you to MessageNotUnderstood.

Each of the tools behaves slightly differently, as its context depends on what you want to do with it. For example, in the refactoring browser, the Find: toolbar searcher will always try and navigate you to any exact match on your search criteria. If you type in a selector, such as 'printString', you will immediately be shown implementors and senders of that message, however it may not have been what you were looking for so the < Back option is still available.

The behavior of the Find: option is contrary to the Visual Launchers dock search which will not try and auto-navigate to a result, but like the browsers find, it will auto-close when you pick a result. Finally, the stand alone 'discovery' tool will shrink itself away to a minimum size when you're not doing a search, but expand with results when you are. It will not close when you click on a result, which lets you quickly navigate and explore potential results that you may be looking for without having to repeat your search again.

Requires: VisualWorks 7.7+

Todo
+----+

* Incremental Indexing (appears to mostly be done)
- unloading parcels/packages leaves junk behind in the cache
* ThreePaneSelectorsBrowser-like search results interface
* Hotkey for searching
* Comment indexing (is this desirable?)
* Memory usage optimizations