Oracle® Solaris Studio 12.4: IDE Quick Start Tutorial

Exit Print View

Updated: October 2014
 
 

Finding Text in Project Files

You can use the Find in Projects dialog box to search projects for instances of specified text or a regular expression.

  1. Open the Find in Projects Dialog box by right-clicking a project in the Projects window and choose Find or choose Edit > Find in Projects (Ctrl+Shift+F).

  2. In the Find in the Projects dialog box, select the Default Search tab or the Grep tab. The Grep tab uses the grep utility, which provides a faster search, especially for remote projects.

  3. image:Default search tab for Finding in Projects dialog                                 box.
  4. In the Grep tab, type the text or regular expression that you want to search, specify the search scope and file name pattern, and select the check box for Open in New Tab so you can save multiple searches in separate tabs.

    image:Grep search tab for Finding in Projects dialog box.
  5. Click Find.

    image:Search results for public using grep search.

    The Search Results tab lists the files in which the text or regular expression is found.

    Buttons in the left margin enable you to change your view of the search results.

  6. Click the Expand/Collapse button to collage the list of files so only the files names are shown.

  7. Double-click one of the items in the list and the IDE takes you to the corresponding location in the source editor.

Find and Replace

You can use the Find/Replace feature in the editor and it works entirely in the Find tool bar at the bottom of the editor window, instead of a separate dialog box for replacing. The Replace field and buttons are displayed in the tool bar under the Find field and buttons. Press Ctrl+F to activate the Find tool bar and Ctrl+H to activate the Replace feature.

Using Your Clipboard History

Once you find the text you were looking for, you might want to copy and use this text in other areas of your code.

You can view the last nine buffers of text that were copied to your desktop clipboard and select one to paste. With your cursor at the point where you want to insert text, press Ctrl+Shift+D to open a popup of the clipboard entries. Use the arrow keys to navigate through the clipboard buffers and see the full contents in the window below the list of buffers. To paste the contents of a buffer, type the number of the buffer, or press Enter when the buffer is selected. Note that this buffer contains content copied from any window on your desktop, not just the IDE.


Tip  -  You can copy a file path to your clipboard by hovering the mouse cursor over any file in the IDE and press Alt+Shift+L.