Eclpise CDT: View all macros defined in source code in a given directory

こ雲淡風輕ζ 提交于 2019-12-11 19:13:52

问题


In Eclipse CDT, How can I see all the macros defined in all the source files under a given directory tree? I don't want to see any macros that are defined in include files that exist outside the given directory tree.

In 'Open Element' dialog (Ctrl+Shift+T), I can uncheck all element types, check only the "Macro" type and then search for '*'. This would show all the macros from the index. There is no control to further filter it based on a "selected resource".


回答1:


I found the answer to this one.

  1. Click on the directory in the Project Explorer on which you want to perform the search recursively.
  2. Hit Ctrl+H to get the Search dialog. Go to the 'C/C++ Search' tab.
  3. In 'Search For' box, uncheck 'Any Element' and check 'Macro'.
  4. In 'Limit To' box, uncheck 'All Occurrences' and check '"Definitions'.
  5. In 'Scope' box, select 'Selected resources'.
  6. Set the search string to '*' (without quotes).
  7. Finally, hit the 'Search' button.



来源:https://stackoverflow.com/questions/13409010/eclpise-cdt-view-all-macros-defined-in-source-code-in-a-given-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!