user1556814
user1556814

Reputation: 583

Finding C++ references in Eclipse

In eclipse C++ (with CDT), I would like to find all C++ references of the selected text. Ideally with the following constraints:

Currently, I know:

So, I have three questions:

  1. Have you got this issue, in a big project with thousands of files, that the indexer gets in a wrong state (it is not in a running step who could explain that, it just seems wrong), so that if you modify a file, a next references search shows weird results, except if your right click on a directory in Project Explorer > Index > Update with Modified Files ? I tried to play around with Window > Preferences > C/C++ > Indexer but had not luck to improve that.
  2. Is it possible to have a shortcut for Ctrl+H, then Enter ?
  3. If not, is it possible to record/tune some kind of macro to avoid repeating these uncomfortable and distracting steps ?

Thanks,

Eclipse details:

Eclipse Version: Luna Service Release 2 (4.4.2)
CDT Version: 8.6.0.201502131403

Upvotes: 2

Views: 1826

Answers (1)

Mykhaylo Kopytonenko
Mykhaylo Kopytonenko

Reputation: 953

Try to find "References in Project" instead of in the whole workspace. If you have several projects in your workspace, the search is slower than in only one project. First try References > In Project from the context menu to see if this command works well enough for you.

If you are satisfied with it, assign a hot key in menu Windows -> Preferences > General > Keys. Filter by text "References in Project", select the item with "Source" category. Change its hot key below and change "When" field to "C/C++ Editor".

Upvotes: 1

Related Questions