Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse C/C++ Developer Guide
Previous Page Home Next Page

Searching for C/C++ elements

It is recommended that you perform searches on successfully compiled programs to ensure the accuracy of search results. It is important to familiarize yourself with the correct search syntax to use to complete an effective search. It is also important to ensure that include paths and symbols are correctly defined. For more information, see Including paths and symbols.

See C/C++ search, for more information on:

  • What you can search for
  • How to limit your search
  • How to use wildcard characters in your search
  • Syntax examples

Performing a C/C++ Search can be done in a number of different ways but regardless of the manner chosen the same information must be provided to C/C++ Search.

The info required to do a search is:
Search string this is the name of the element you are looking for. See C/C++ search for more information on how to specify wildcard searches and how to further refine your searches by using fully qualified names
Search For this is the element type that you wish to search for. You can also select to search on ‘Any Element’ which will perform the search on a combination of all elements
Limit To this allows you to limit your search to declarations, definitions or references. You can also select ‘All Occurrences’ which will search for declarations, definitions and references that match the element
Scope this allows the user to limit the scope of the search. The three available scopes are:
Workspace this searches all of the open projects in the workspace
Selected Resources this option becomes enabled whenever something is selected in one of the following views in the C/C++ perspective:
  • C/C++ Projects
  • Project Explorer
  • Search
  • Outline

The scope will be limited to whatever element is selected in the view.

Working Set working sets can be selected and created

There are 3 main ways for initiating a C/C++ search:

  • Using the C/C++ Search dialog
  • Selecting an element in the Editor view
  • Selecting an element in the C/C++ Projects view or Selecting an element from the Outline view

Using the C/C++ Search dialog

Search dialog box

  1. Enter the search string in the Search String field (optional mark it case sensitive).
    Note: that previous search queries (from the same work session) are remembered and can be accessed via the drop down list.
  2. Select the Search For element.
  3. Select the Limit To.
  4. Select the Scope.
  5. Press Search.

Results are displayed in the Search view.

Selecting an element in the Editor view

  1. Select the desired element in the editor.
  2. Right click and select All Declarations or All References and the scope you wish to search.

Results are displayed in the Search view.

Selecting an element in C/C++ Projects or Outline View

  1. Select the desired element in the tree.
  2. Right click and select All Declarations or All References and the scope you wish to search.

Results are displayed in the Search view.

For more information, see:

  • Workbench User Guide > Concepts > Views > Search view
  • Workbench User Guide > Concepts > Workbench > Working Set
  • Workbench User Guide > Tasks > Navigating and finding resources
  • Related concepts
    C/C++ search
    C/C++ Indexer
    CDT Projects
    Open Declaration

    Related tasks
    Selection Searching for C/C++ elements
    Navigate to C/C++ declarations

    Related reference
    C/C++ search page, Search dialog box


    IBM Copyright Statement

      Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire