Rather than write a plugin for Google Desktop to enable SCL search, I went the quicker, dirtier, and easier path (for me, anyway) and wrote a couple macros in Excel to index a set of SCL files (extracting all procedure and routine declarations) into an Excel worksheet. A while back I wrote an interface for Excel's AutoFilter that makes setting filters on large datasets a little easier than without.
One thing to note is I haven't set it up to read any subroutine declarations that span multiple lines (using the line continuation character "\") so at the moment it won't pick up the full declaration.
Updated: 10/21/08 - Modified the auto-filter helper to run faster in populating the result list box for large data sets
To use this indexer, simply copy the SCL_Indexer.xls file to your computer, and open it in Excel. I signed the VBA project with a digital certificate created on my own computer, so you should be able to import the certificate, but to be honest I'm not sure how that will work, and you may be stuck hitting "enable macros" every time you open the file. If nothing else, you can try saving the file to a trusted location.
When you open the file (with macros enabled) the indexer will create a toolbar called "AutoFilterHelper". This toolbar contains the buttons for running the indexer and searching the index (In Excel 2007 a section will be added to the Addins ribbon with the buttons).
To use the indexer just click on the binocular button. This will open a form that allows you to select a directory or file, and to index it. You may select to index any subdirectories from a directory. Hit cancel while it's indexing if you want it to stop.
Once the index is built you will see that the worksheet is populated with all procedure and routines indexed, with the return type (Null means it's a procedure) and arguments listed. The file name for each subroutine is listed as well.
To use the auto filter helper, click on the magnifying glass, and select the column header you want to search. It may take some time to populate the result box, but you will see a list of all subroutine names in the bottom right box. To search the list, start typing in the text box and the results in the result box will reflect what you've typed in the search box.
Select an item in the result box and click "Apply Filter" and that filter will be applied in the index worksheet. For more information on auto filter: http://www.contextures.com/xlautofilter01.html
No comments:
Post a Comment