Filtering Eclipse's C++ Content Assist

自闭症网瘾萝莉.ら 提交于 2019-12-07 16:43:06

问题


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?


回答1:


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.

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.

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.



来源:https://stackoverflow.com/questions/566037/filtering-eclipses-c-content-assist

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