Locating an Element in a Browser Editor Pane

Use the Find/Replace command from the Edit menu to locate text in the editor pane of the current browser and optionally replace the located text with a specified value.

The search for your specified text is started from the top of the editor pane or from the current caret position, depending on the settings in the Start From group box. See also "Finding the Next Occurrence of Specified Text", "Searching for Text in a Reverse Direction", "Locating Text on Which the Caret is Positioned", and "Searching for an Element in all Classes in the Current Schema", later in this chapter.

To limit your search, perform one of the following actions

To locate and optionally replace text in the editor pane

  1. Select the Find/Replace command from the Edit menu or press Ctrl+F.

    The Find/Replace dialog, shown in the following example, is then displayed.

    The contents of the Search Text combo box is selected (overtype mode) when the dialog is opened. This combo box contains a list of the text of the last 50 unique searches that you performed, so that you can repeat previous searches by selecting an entry from the combo box list. This list is maintained in the user profile of your current user logon.

  1. In the Search Text combo box, specify or select the text that you want to locate in the editor pane.

  2. In the Replace Text combo box, specify the text that is to replace any located text that is specified, if required. When the dialog is opened, this combo box is always blank, to prevent accidental replacements with text from previous replacements.

    This combo box contains a list of the text of the last 50 unique replacements that you performed, so that you can repeat previous replacements by selecting an entry from the combo box list. This list is maintained in the user profile of your current user logon.

  3. If you want the exact match by case (where uppercase or lowercase is significant), check the Case Sensitive check box. A search is then performed for text with the same capitalization as the text in the Search Text combo box. By default, searching is case-insensitive; that is, this check box is unchecked.

    You can optionally replace text that is located and matched by case with text with the same capitalization as the specified in the Replace Text combo box.

  4. If you want only text that is an identifier in which the whole word matches to be located and replaced, check the Full Word Only check box. If this check box is checked and the text is not an identifier, the locate and replace actions will fail.

    By default, any identifier text that matches the string that is being searched for will be located and replaced, regardless of whether it is embedded or not in another word.

  5. If you want to confirm that each occurrence of the specified search text is replaced with the specified replacement text, check the Prompt on Replace check box. By default, you are not prompted to confirm text replacement; that is, this check box is unchecked.

    When you select text replacement confirmation and you click the Replace All button, the Verify Replace dialog is displayed every time the search text is located. In the Verify Replace dialog, perform one of the following actions.

    • Click the Yes button to confirm that the located text is to be replaced.

    • Click the No button to leave the highlighted text unchanged and continue searching for the specified string.

    • Click the Cancel button to abandon the search and return focus to the editor pane.

  6. If you want to search backwards through the contents of the editor pane from the current caret position up to the beginning of the editor pane, check the Search Backwards check box. The Search Backwards check box is enabled only when you select the Caret option button in the Start From group box. By default, searching is performed from the current caret position to the end of the editor pane; that is, this check box is unchecked.

    When this option is checked, you have specified your search and replacement text, and you click the Replace All button, the Verify Replace dialog is displayed every time the search text is located.

  7. If you want the search to start from a specific position in the editor pane, select the Caret option button in the Start From group box. The Search Backwards check box is then enabled. (Alternatively, you can press Shift+F3 or select the Find Again Reverse Direction command from the Edit menu.)

    By default, the Top option button is selected, indicating that the search begins at the top of the editor pane.

  8. By default, comments in the source of a method are searched for and optionally replaced, in JADE methods only. Uncheck the Include Comments check box if you do not want to search for and optionally replace occurrences of the search text in method comments, including line (//) and block (/* */) comments.

    The Include Comments check box is set to true (that is, checked) for the first search performed after logging on. Subsequent displays of the local Find/Replace dialog set the check box value to the prior setting that was used to perform a search or replace action.

  9. To find the next occurrence of the specified text, click the Find button.

    If JADE finds the text string that matches your specified options, the located text is then highlighted and focus is returned to the editor pane. If JADE cannot find the text string that matches your specified options, a message dialog informs you that the search text was not found and waits for you to click the OK button in the message dialog before returning focus to the editor pane.

  10. To replace all occurrences of the text specified in the Search Text combo box with the text specified in the Replace Text combo box, click the Replace All button.

    If JADE finds the text string that matches your specified options, all occurrences of the located text are then replaced with the specified replacement text and focus is returned to the editor pane. If you checked the Prompt on Replace check box, you are prompted to confirm that each occurrence of the located text is to be replaced.

  11. Click the OK button. Alternatively, click the Cancel button to abandon your selection.

    The values of the Case Sensitive and Full Word Only check boxes are false (that is, unchecked) the first time the dialog is displayed after logging on to the JADE development environment. After you perform a search, the values used in the search are saved. Those values are restored the next time the dialog is used in your current development environment session.