views:

226

answers:

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?

+1  A: 

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.

Eclipse CDT Screenshot

rq