Using Sun WorkShop

Searching for a Pattern

To search for a pattern:

  1. In the Sun WorkShop main window, choose Browse > Pattern Search or click the Browsing button; then click the Pattern Search radio button in the Browsing window.

  2. Look in the Browsing window title bar to be sure you are in the correct browsing directory.

    If not, choose Browse > Change Browsing Directory and select the correct directory in the Pattern Search Directory dialog box.

  3. Type the pattern for which you want to search in the Pattern text box.

    If you cannot remember the exact symbol for which you want to search, you can use wildcard characters (., *. ^, and $) in your pattern (see "Special Characters in Patterns").

  4. Type a filter in the Files text box.

    The default filter searches the current directory for all files ending in .h, .c, .cc, or .f. Sun WorkShop saves the filter in your WorkSet whenever you save the WorkSet.

    Pattern searching uses the sb_init file to search multiple directories. It applies the Files filter to each directory.

  5. Press Return, choose Query > Find Matches, or click the Find Matches button.

  6. Move through the Match pane using the mouse, the Next Match and Previous Match buttons or menu items, or by pressing F5 and Shift+F5.

  7. Click a match to view the source in the editor window.


    Note -

    If you are overwhelmed by the number of matches found, restrict the types of files searched by changing the file types in the Files text box, and repeat the search.


You can search text displayed in the editor window. Double-click the text in the editor window to copy it, and paste it in the Browsing window's text box. If you are using vi or XEmacs as your text editor, you can also select text in the editor window and click the Find Refs button in the tool bar.