Search Quick Reference




Scope of searching

The search window can work in three different ways, it can search the current file, all open files, or the entire project. The scope of the search is set by the window from which the search menu was selected, and is as follows:

The Toolbar and Build windows will search the entire project.

The Project window will search all open files (ones which have editor tabs)

The Editor window will search the all open files (The Find button and the Find menu searches the current file)

The Quick-Link window will search the current file.

Search Type Once the search window is open, you can specify the type of search to be carried out manually by selecting the scope in the top gadget. Certain gadgets may then be available, depending of which search type you have selected.

back to the top





We shall cover the functions available while searching the current file in this first section. The second section covers the searching of open files and the entire project.


Top Tip

To make searching easier, the search window will automatically detect if there is a marked block of text in the editor, and insert it into the string gadget for you when the window opens. Multiple lines cannot be inserted, and in this case, the text inserted will finish at the end of the first line. It will also be truncated to the maximum length allowed in string gadgets if it is too long. Double or Triple clicking text items will highlight words and lines easily for you prior to opening the search window.


When entering text into string gadgets, you have to confirm the entry by pressing <Return> or <Enter> after the text is entered, this is a requirement of the operating system, and allows the user to change or even cancel text entry by simply navigating away from the string gadget.

Navigation via the keyboard has also been improved, and by pressing "TAB" will activate the search string gadget for you. Further presses of TAB will activate each gadget in turn.

Searching in a file When searching the current file, the requester will look like this. The string that you are searching for should be entered into the top string gadget. You can select whether you want this search to match exactly with what you supplied. or whether to ignore the case of any letters in the string.

There is also an option to replace what was found with something else by ticking the checkbox in the "Replace attributes" section. You should then enter the string you want to replace with in the next string gadget.

The bank of buttons at the bottom will then allow you to continue with carrying out the specified action.

"Search" simply finds the first occurrence of the supplied string from the current cursor position.

"Replace Next " will be enabled if you have supplied a string in the second gadget, and this will replace the next occurrence.

"Replace All" will, again if you have supplied a string, replace all occurrences of the string found with the one supplied.

"From Top" will start the search from the top of the file instead of at the current cursor position.

"Next" finds the next occurrence of the string.

"Prev" finds the previous occurrence of the string.

This second section covers searching all open files and the entire project. The process is the same for both types of search, except the range of the search is limited accordingly.

Searching in all files You will notice that the search requester looks slightly different from the last time, where we searched only the current file. This time there is the addition of a list at the bottom. This is where the results of the action to be carried out will be shown.

The ability to replace one string with another is still possible, but now the scope of that change is expanded to the entire project or all open files. Open files have a corresponding "Tab" in the editor, not just the file that is currently shown. The open files are also highlighted with a white background in the Project window list.

This time, because the scope of the search (with optional replace) has changed to a much broader range, the "Replace Next " button is not available.

The "Search" button will find all occurrences of the string supplied in either all of the open files or the entire project, depending on what was specified.

The "Replace All" button will not only find all occurrences of the string within the scope of the search, but will replace it with the string supplied.

Finally clicking "Search" will start the process of searching the specified files. Depending on how many files are to be looked in to, this may take a while. Luckily the search will run separately from the rest of the system, so you can continue to work while it does, and even click on items in the search results while the search is still running.

In either case, once the search has finished, the list will contain the results of any actions carried out. In our example project, searching the project for "Welcome" with case-sensitivity turned off gives us the results below.

Search Results The results are arranged by file, and then by line number. The order that the files are searched is the same as the order in which they are listed in the Project window. If the line is within a function, its name is also shown in bold for clarity.

Large searches may turn up a lot of entries that are of no interest, and in this case the "Remove" button can be used to delete the currently selected item in the list, so that the results may be trimmed down to contain only relevant information. This will also remove the marker from the file (explained below) that it is associated with, and if current, remove it from the editor too.

Each line in the list of results is "clickable", which means that double-clicking on a line will take you to a place in a file. Clicking the line that depicts which file the result was found in, will take you to the beginning of that file. It will be loaded into the editor (if not already loaded) and the cursor placed at the beginning of the file. Clicking a result will take you to that file and to the line number shown. The results list will look exactly the same if a replace operation was specified, except that each line would highlight the new string instead of the string that was searched for.

Search Item When switching between the results list and the editor window, the search results list will keep the last selected item highlighted for you. This serves as a reminder of the the last result you may have jumped to when you return to the search window. Each occurrence of the search string will be highlighted in the editor by a coloured line. By default, this will be a green background on every line where the result was found.

These will remain valid for every file where an occurrence was found until the "Clear Results" button (underneath the Search results list) is used. This will clear the list of search results in the search window, and also remove all highlighted items in all files. These "markers" in the file will always point to the location of the search hit, even if the file gets changed, or sections are added or removed. This way, you may edit the file and still be able to jump to a specified location accurately.


back to the top




Search or Find

In order to make the search linkage easier, there are two separate menu items that will both invoke the Search requester. The "Project/Search" menu item will invoke the context aware search as described earlier, while the Editor/Find menu item will always start a search in the current file. The Find menu is mirrored by the Find Button button in the Editor toolbar.


back to the top




Valid XHTML 1.0 Transitional This is a W3C checked and compliant webpage.