Search v2.00b

by Thorbjörn Jemander.

1. Introduction

This add-on lets you search the contents of the files that you have marked in the Tracker. It recursively descends down into any marked directories and searches the conents of the files present there. There are two ways to specify the search string; the first is to just use the contents of the clipboard, the second is by explicitly enter the string in a by the program provided text control. There are several search options regarding case sensitivty, wildcards and regular expressions.

2. Archive

The following entries are included in the package:

3. Requirements

Search v2.00 requires BeOS R3/x86 and Marco Nelissen's layout library liblayout. It can be found in BeWare.

4. Installation

Drag Search-S to folder "Drop Search-S Here To Install".

5. Operation

5.1 The clipboard

Make sure that you have the text you want to search for in the clipboard by copy it somewhere e.g. in a editor, terminal or a text control somewhere.

5.2 Invocation

Mark the files and folders you want to search in the Tracker and choose the Search add-on in the add-ons menu, or press Command-Option-S. (The command key is mapped to Alt on most x86 keyboard layouts.)

5.3 The Parameter Window

If the clipboard is empty when the add-on is selected OR if you activate it (by pressing the right command key while launching the add-on) a window will appear where you can modify the selected text and specify some search criteria:

You also have a history menu of previous searches. You can clear the history with the so marked button. Start the search by pressing the Search button or hit enter on the keyboard.

5.4 The Result Window

When the search has started, a window will open that displays the files that are found to contains the specified text. They appear on the list as the algorithm finds the files.

The files can be double-clicked to be launched with its preferred application. Holding down shift while doing it, causes its parent folder will be opened in the Tracker. The same thing can be accomplished by pressing the buttons above the listview.

Below the list view there's a check box that determine whether the full path should be visible or not. Default is on. (The files can still be invoked when only the names are visible.)

When the search is finished, the first item (if any) in the list will be marked and there will be a system beep.

6. Bugs

No that I know of. Enlighten me! :) However, the regexp search is not tested very hard since I'm not an expert on it myself. There could be a question on how reliable the regexp search is over the 64k boundary. It is not tested very good due to a limtied time and experience. This software should be regarded as beta.

7. Limitations

The maximum size of the searched text is currently 255 characters. The wildcard extension is max 256 characters.

8. Performance

I have not done any timing, but the fastest search is done with no options checked. The buffer size is 64k and by using the BeOS API that should guarantee a high speed. The case insensitivity is slower and the regexp search is considerably slower.

NB! It is not an good idea to make two searches simultaneously, especially on IDE-based hardware. It will kill the system in terms of performance and the searching speed becomes utterly slow.

9. History

10. Thanks...

... to Rainer Riedl who came with valuable suggestions and source code, and to you all other that encouraged me. Thanks also goes to Marco Nelissen for providing the nice liblayout library. And to those at Be. And to BeDevTalk participants. And to...

11. Legal stuff

I do not take any responsibilities what so ever for any consequences caused by, or even remotely associated with this program. You use it entirely at your own risk and I do leave no guarantees that this program will work 100% as stated here. You may copy, redistribute and modify it as much as you want as long as you (or another person, company foundation or similair) does not make commercial profit on this program and if this archive is distributed intact.

12. Contact info

Comments, bug reports, feature requests etc, are grately appreciated and can be sent to:

thoan@ifm.liu.se

Enjoy!


Late September 1998

Thorbjörn Jemander