Gewure
Gewure

Reputation: 1268

How to find occurrences of a #define in Eclipse

Call Hierarchy (Ctrl+Alt+H) works for variables, fields, structs, types and functions.

But how do i visualize the occurrences of a #define constant in Eclipse?

e.g.: #define ObjSpc "IEDM1CPUWTG"

EDIT: User Lundin pointed out that the source-search (Ctrl+H in project-explorer) is capable of doing this. Thanks for the answer.

Nevertheless i wrote a featurerequest to the Eclipse CDT Project.

Upvotes: 0

Views: 365

Answers (1)

Lundin
Lundin

Reputation: 213711

In the Eclipse IDE, click the menu Search -> file search. (Or some such, this menu is apparently different on different implementations of Eclipse.) Type #define.

This should highlight all occurrences of #define that are part of the compiled source code, skipping comments etc.

Upvotes: 1

Related Questions