问题描述
我在C ++项目中使用Eclipse Ganymede(版本3.4.1).有什么方法可以过滤内容辅助列表,使其仅显示当前上下文中可用的方法和字段?
如果没有,为什么不呢?曾经有一种情况我想访问对象中的私有字段等吗?
I'm using Eclipse Ganymede (version 3.4.1) with a C++ project. Is there some way to filter the content assist list to only show methods and fields that are available in the current context?
If not, why not? Is there ever a situation where I would want to access the private fields, etc. in an object?
推荐答案
看起来不像.至少有一对 有关此问题的错误打开.您很幸运,它显示的太多了!它似乎对我没有任何帮助.
Doesn't look like it. There are at least a couple of bugs open regarding this. You're lucky it shows too much! It never seems to assists in any way for me.
最新的CDT(在编写Helios时,CDT版本为7.0.0.201006141710)已修复了第二个错误.但是,当我尝试使用私有成员变量时,它仍然显示在完成列表中,如下所示.
The latest CDT (at the time of writing Helios, with CDT version 7.0.0.201006141710) has the 2nd of those bugs fixed. However private member variables still showed up on the completion list when I tried it out, as shown below.
它似乎确实取决于类中变量声明的顺序.如果在public
部分之前有private
部分,则将正确过滤出专用变量.虽然并不完美,但肯定比木卫三要好得多.
It does seem to depend on the order of variable declaration in the class. If you have the private
section before the public
section the private variables are filtered out correctly. While not perfect, it's certainly a great deal better than it was in Ganymede.
这篇关于过滤Eclipse的C ++ Content Assist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!