Search/Replace view

The Search/Replace view allows you to search for and replace text in one or multiple documents.

The Window > Views > Search/Replace menu option opens the Search/Replace View.

Figure: Search/Replace View

This figure is a screenshot of the Search/Replace view.

Search/Replace Fields

Fields allow you to set the search / replace criteria:

Find
Enter a search string, or click the down arrow next to the input box to select from a list of previously entered strings.
Replace
Enter a string to replace the string specified in the Find field. Leave this field empty if you do not wish to replace the found text. You can enter the replacement string, or click the down arrow next to the input box to select from a list of previously entered replacement strings. To replace the text with a space, type a space in this box.
In
Select the scope of the search/replace:
  • Current file - Search in the current file only.
  • Open files - Search in all open files.
  • Folder - Search within a specified folder. You specify the folder, as well as some additional options, in the Folder field. Selecting Folder has the same effect as the Find in Files menu option.
  • Current project - Search in all files of the current project.
File types
Limit your search and replace to specific file types, specified by *.ext where ext is a file extension.
Folder
Limit your search results to the contents of a specified folder. You can use the magnifying glass icon to specify the folder. Within this folder, you can use the check boxes to identify whether to include the subfolders of the selected folder, and whether to include hidden files.
Note:

The Folder combobox is enabled when Folder is selected for the In field.

Search/Replace Options

A series of checkboxes allow you to further refine your search and replace options.

Case Sensitive
When selected, differentiates between uppercase and lowercase when performing a search.
Match whole word only
When selected, will not find and/or replace the string if it is contained within another string.
Use
When selected, you can choose to use Regular Expressions or Wildcards (* and ?).
Note:

If Use is checked, the Match whole word only option can not be used and is disabled.

Wrap around
When selected, if the search reaches the end of the file, start at the top of the document to find the next occurrence.
Incremental search
When selected, stop at each occurrence of the string
Restrict to selection
When selected, if a section of a document is selected, restricts the search to that section.
Text search
When selected, the string is searched for in the text file. When not selected, the string is searched for in the formatted Genero file.
A formatted Genero file refers to a file that displays graphically, rather than text-based. For example, when you open a .4fd file in Form Designer, you are shown a graphical view of the form. This is referred to as a formatted Genero file.
To demonstrate:
  1. Open the HelloWorld demo project.
  2. In the Search/Replace view:
    • Type "gr1" in the Find field.
    • Select "Current project" from the In combobox.
    • Ensure Text search is not selected.
    • Click the Find all toolbar icon.
    In the Search Results view, a single result displays for the HelloForm.4rd file.
  3. Double-click on the entry.
    • The graphical view of HelloForm.4rd opens in Form Designer.
    • The searched-for string is highlighted in the Properties view. In this example, it is the value of the name property for the Grid object.
  4. In the Search Results view, click the Clear all search results toolbar icon.
  5. Modify your options in the Search/Replace view:
    • Select the Text Search checkbox.
    • Click the Find all toolbar icon.
    In the Search Results view, a single result displays for the HelloForm.4rd file. The listing for the result, however, is based on the XML representation of the .4fd file.
  6. Double-click on the entry.
    • The XML view of HelloForm.4rd opens in Form Designer.
    • The searched-for string is highlighted in the XML (text-only) file.
Tip:

The Text Search option works on unsaved text files, but only works on the saved formatted Genero files, as the underlying text/xml file is only generated when the formatted Genero file is saved to disk.

Search/Replace Toolbar

In the view's toolbar, icon buttons allow you to control the direction of the search and the implementation of the replace. The icons in order (left to right):

  • Find previous
  • Find next
  • Find all
  • Replace previous
  • Replace next
  • Replace all
  • Stop

The Edit > Search/Replace menu

The Edit > Search/Replace provides a menu interface that allows you to perform many of the same tasks allow you to find/replace text in documents, as well as clearing the Search Results view.

  • Edit > Search/Replace > Find (CTRL + F) opens the Search/Replace view.
  • Edit > Search/Replace > Find in Files (CTRL + SHIFT + F) opens the Search/Replace view with Folders selected for the In field.

Escaping the dialog

When in the Search/Replace dialog, press the ESC key to return focus to the top-most file opened in the central work area.