Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] indexer issue

Hi GandJ,

   Try to use the Open Element to find out foo declaration. To do this press Ctrl + Shift + T and type the element.
   You also can select the element before enter in Open Element.

Regards,
Marcio

On Thu, Mar 6, 2008 at 3:08 AM, GandJ Mitbbs <gandj.mitbbs@xxxxxxxxx> wrote:
Dear CDT developer,

I'm using Eclipse CDT for XP as code browser for my Linux project, since the indexer in Linux version couldn't work with my code for unknown reason and that's another story. The indexer is good in general, but still has a couple of issues and I hope to get your help.

1) Is there any shortcut to find function definition? Right now only "Declaration" and "References" are supported when I right click the function name and get the pop-up. My current workarounds  are: a) find the function declaration in .h, and then "ctrl+tab" to switch to the .cpp file; b) use C++ search and select "function" "definition". Since it's a frequent operation to me, I would like to know a faster way.

2) Sometimes the index reports wrong finding.I have the following code:

#include foo.h

typedef foo::foo<int, float> myFoo;

...

When I use CDT indexer and want to find out where's foo's declaration, it leads to struct foo { ... } in file fooStruct.h. However, obviously this is a template foo defined in the namespace foo, and the definition is right in foo.h.

I'm not sure what the algorithm is used in indexer. For the same identifier foo as struct, template, namespace, and possibly function name or variable, doesn't the indexer assign different types to the id? If so, why it cannot tell the one I'm interested is the template? Does it return the first declaration in its search? Can I let it return all declaration it finds? Then at least I have chance to correct it. Right now I guess out foo.h is the one I should read and I'm lucky. But it's not guaranteed.

In addition, in the C++ search pop-up, I couldn't specify "Template" to search. Is it possible to add this element in the future?

Thank you very much for any comments and suggestions.

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top