简体   繁体   English

如何在 Eclipse (CDT) 的 Outline 视图中进行全面搜索

[英]How to do a full-fledged search in the Outline view in Eclipse (CDT)

I am using Eclipse CDT for C code browsing at work.我在工作中使用 Eclipse CDT 浏览 C 代码。 Very often I like to search for a function name that I really don't know the name of.很多时候我喜欢搜索一个我真的不知道名字的函数名。

The good part is that there is a search available and as soon as I start typing with my cursor in the Outline window, it starts looking for a match.好的部分是有一个可用的搜索,只要我开始在大纲窗口中用光标输入,它就会开始寻找匹配项。

The problem, though, is that my guess has to match the beginning of the function name.但是,问题是我的猜测必须与函数名称的开头匹配。

ie I can find get_var_xyz() by typing get_var_xyz() or narrow down to get_var_xyz and get_var_abc by typing get_var.即我可以通过键入 get_var_xyz() 找到 get_var_xyz() 或通过键入 get_var 缩小到 get_var_xyz 和 get_var_abc。

I cannot just simply search for xyz if I don't know what the preceding text is.如果我不知道前面的文字是什么,我就不能简单地搜索 xyz。 That's what I want to be able to do.这就是我希望能够做到的。

Is there a setting for this hiding somewhere?是否有隐藏在某处的设置? Or a plugin I could install?或者我可以安装的插件?

Alternatively, it doesn't even have to be via Outline.或者,它甚至不必通过 Outline。 As long as I can say "In the current file, show me all functions that contain this text"只要我可以说“在当前文件中,向我显示包含此文本的所有函数”

Thanks in advance!提前致谢!

So I found this.所以我找到了这个。 If you do a "Ctrl+O" it brings up a small window called the quick outline.如果你按“Ctrl+O”,它会弹出一个叫做快速大纲的小窗口。 In this I can use wildcard (*) while searching which is extremely useful!在这里,我可以在搜索时使用通配符 (*),这非常有用!

You can try Navigate->Open Element from the main menu.您可以尝试从主菜单导航->打开元素。 That dialog supports wildcards, has rich filtering capabilities and works across several files.该对话框支持通配符,具有丰富的过滤功能并且可以跨多个文件工作。 If I need to find something in a single file, I usually use increamental find (Ctrl+J)如果我需要在单个文件中查找某些内容,我通常使用增量查找 (Ctrl+J)

For complex files, "*" crash in quick outline dialog.对于复杂文件, "*"在快速大纲对话框中崩溃。 A workaround is type the first, then navigate to the beginning and INSERT a "*" .解决方法是输入第一个,然后导航到开头并插入"*" It works for me, ugly :(它对我有用,丑陋:(

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM