Eclpise CDT:查看给定目录中源代码中定义的所有宏 [英] Eclpise CDT: View all macros defined in source code in a given directory

查看:153
本文介绍了Eclpise CDT:查看给定目录中源代码中定义的所有宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse CDT中,如何查看在给定目录树下的所有源文件中定义的所有宏?我不想看到在给定目录树之外的包含文件中定义的任何宏。

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.

在打开元素对话框中( Ctrl + Shift + T ),我可以取消选中所有元素类型,只检查宏类型,然后搜索*。这将显示索引中的所有宏。没有任何控制可以根据选定的资源进一步过滤它。

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. 点击项目资源管理器中您要递归执行搜索的目录。

  2. 击中 Ctrl + H 以获取搜索对话框。转到C / C ++搜索标签。

  3. 在搜索框中,取消选中任何元素,然后选中宏。

  4. 在限制到框中,取消选中所有出现事件并选中定义。

  5. 在范围框中,选择所选资源。

  6. 将搜索字符串设置为'*'(不带引号)

  7. 最后点击搜索按钮。

  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.

这篇关于Eclpise CDT:查看给定目录中源代码中定义的所有宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆