Home » Language IDEs » C / C++ IDE (CDT) » [Read this] About navigation/code assist/indexing
[Read this] About navigation/code assist/indexing [message #208379] |
Mon, 21 January 2008 13:56  |
Eclipse User |
|
|
|
Originally posted by: joaho.statoilhydro.com
[Disclaimer: I am working in a rather conservative organisation, and stuck
with eclipse-3.2 / cdt-3.1.]
(Sorry - some typos sneaked past in the first post - trying again.)
Hello,
I have just startet eclipse for my C development; so far it has been a
somewhat mixed experience. Some things have worked very nicely, whereas I
have had a bit problems with others. In particular I have found the code
assist and navigitaton facilities a bit confusing.
I have three different libraries libA, libB and libC, and within eclipse
they are organised in three different projects, in the same workspace. My
workspace looks like this:
~/workspace/libA/src
~/workspace/libA/lib
~/workspace/libA/include
.....
[The same for libB and libC]
The src directory contains the *.c files *AND* the *.h files - the
exported (in my case nearly all) header files are copied to the
corresponding ../include directory as part of the build process. The three
libraries are in hierarchy, i.e. libB depends on libA, and libC depends on
both libA and libB.
Now these are my "problems":
1: When editing a source file I can position the cursor under a function
name, and use Ctrl+F3 to jump to the implementation of that function.
However, it seems I can not get out of the current project, i.e. if
editing a source file in project B and placing the cursor under here:
some_func_in_libA(arg1,arg2)
I can not get eclipse to jump to the implementation of
some_func_in_libA(..), I can get it to go to the header file containing
the prototype with F3 though, and from there I can use Ctrl+F3 to go to
the implementation - but that does not feel very good.
2: The code assist feature only works for features within the same
project. But I guess it is all part of the same problem as mentioned above.
3: I would love a function which prompted me for a function name, and took
me there - anywhere in the workspace - is that available?
4: How can I add documentation to my own functions, so that I can get a
description when hovering over a function name?
I am using the "Full indexer" for all my projects, but it seems the
indexer does not really extend beyond the current project - maybe with the
exception of the header files detetcted during build?! Is there a way I
can inspect the index - and see what is indexed.
Does the indexer work on a project basis or a workspace basis - I guess I
would like a workspace based index?
Very grateful for any answers.
Best Regards
Joakim Hove
|
|
|
Re: [Read this] About navigation/code assist/indexing [message #208404 is a reply to message #208379] |
Tue, 22 January 2008 08:33  |
Eclipse User |
|
|
|
On 2008-01-21 13:56:44 -0500, joaho@statoilhydro.com (Joakim Hove) said:
> [Disclaimer: I am working in a rather conservative organisation, and
> stuck with eclipse-3.2 / cdt-3.1.]
>
> (Sorry - some typos sneaked past in the first post - trying again.)
>
> Hello,
>
> I have just startet eclipse for my C development; so far it has been a
> somewhat mixed experience. Some things have worked very nicely, whereas
> I have had a bit problems with others. In particular I have found the
> code assist and navigitaton facilities a bit confusing.
>
> I have three different libraries libA, libB and libC, and within
> eclipse they are organised in three different projects, in the same
> workspace. My workspace looks like this:
>
> ~/workspace/libA/src
> ~/workspace/libA/lib
> ~/workspace/libA/include
> ....
> [The same for libB and libC]
>
> The src directory contains the *.c files *AND* the *.h files - the
> exported (in my case nearly all) header files are copied to the
> corresponding ../include directory as part of the build process. The
> three libraries are in hierarchy, i.e. libB depends on libA, and libC
> depends on both libA and libB.
>
> Now these are my "problems":
>
> 1: When editing a source file I can position the cursor under a
> function name, and use Ctrl+F3 to jump to the implementation of that
> function. However, it seems I can not get out of the current project,
> i.e. if editing a source file in project B and placing the cursor under
> here:
>
> some_func_in_libA(arg1,arg2)
>
> I can not get eclipse to jump to the implementation of
> some_func_in_libA(..), I can get it to go to the header file containing
> the prototype with F3 though, and from there I can use Ctrl+F3 to go to
> the implementation - but that does not feel very good.
>
> 2: The code assist feature only works for features within the same
> project. But I guess it is all part of the same problem as mentioned
> above.
>
> 3: I would love a function which prompted me for a function name, and
> took me there - anywhere in the workspace - is that available?
>
> 4: How can I add documentation to my own functions, so that I can get a
> description when hovering over a function name?
>
> I am using the "Full indexer" for all my projects, but it seems the
> indexer does not really extend beyond the current project - maybe with
> the exception of the header files detetcted during build?! Is there a
> way I can inspect the index - and see what is indexed. Does the indexer
> work on a project basis or a workspace basis - I guess I would like a
> workspace based index?
>
>
> Very grateful for any answers.
>
> Best Regards
>
> Joakim Hove
have you tried adding the other projects to the "include" path of the
current project, ie, for project B, try adding workspace/libA/src as an
include directory for libB, that way the indexer knows where to look
for those headers. After you do this, force the index to rebuild, and
all the navigation features should start to work.
Documentation - I recommend Doxygen style comments. CDT will recognize
this and you can generate nice html (and other) docs during you
development for others to easily read.
Mike Jackson
|
|
|
Goto Forum:
Current Time: Sun Jun 08 11:16:26 EDT 2025
Powered by FUDForum. Page generated in 0.10657 seconds
|