[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] "Add Include" does not work
|
Andy,
The Linuxtools libhover plugin for glibc handles this today. Based on
the glibc documentation, it
provides you with function completion and hover help for the C library.
Also note that add include support works since the required headers are
in there. Your example of adding sleep adds unistd.h as expected.
Try it out.
-- Jeff J.
Andy Jin wrote:
Thanks Markus,
Just want to confirm what it is now. In terms of participating in the
indexer works, will consider and get back to you soon.
Have a nice day,
Andy
Schorn, Markus wrote:
If the header file has not been indexed we have no means of finding the
definition. What you'd really need is a way of indexing headers outside
of the workspace that have not yet been included by a source file. I
think
we have an open enhancement request on this. However, no one is working
on
that. Specifying the files that should be indexed may be a challenge. As
an
approximation we could index the headers that reside directly in the
folders of the include search path (i.e. excluding subfolders).
Are you willing to work on that?
Markus.
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx
[mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Andy Jin
Sent: Wednesday, April 01, 2009 4:58 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] "Add Include" does not work
Importance: Low
In CDT5 (and also in CDT6):
1. Create a simple HelloWorld C project using GNU Linux GCC toolchain.
2. Insert sleep(5); in source after "puts". sleep() is
defined in unistd.h which is not in the current include
directive 3. Save file 4. Highlight sleep, right click 5.
Select Source > Add include. Observed: include for unistd.h
is not inserted 6. Build project - warning that function
sleep is implicitly declared 7. add include for unistd.h by
hand, build project - projects build with no warnings
A debug of the "AddIncludeOnSelectionAction" class shows that
when the symbol name is not already in the indexer, from the
code comments - it will do either a type caching search or a
full search (between line 327 and line 333). However neither
the type caching search nor the full search has
implementation. They are just empty if-then cases.
How did it work before? Is there a plan to implement both
missing searches?
Thanks,
Andy
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
------------------------------------------------------------------------
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev