Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Content assist does not work in non-source directories - bug or feature?

Hello folks,
 
here is something I came across and I am not sure whether this is a bug
or a feature or something in-between. So here is my story:

- I wrote myself some code templates and a help-plugin
(org.eclipse.cdt.ui.CHelpProvider) which supplies F1 online help and
hover help.
- I created a new managed make C++ (same goes for C, btw) project and
put a single source file in the project directory. All help features
worked for the moment.
- I added a new source folder to my project. The wizard informed me that
"To avoid overlapping, the existing project source folder entry will be
replaced.". Since I didn't quite understand (at that time) what this was
supposed to mean I ignored it and went ahead.
- I closed and re-opened eclipse.
- After this none of my help features worked anymore. No templates were
displayed for code assist and the code in my
org.eclipse.cdt.ui.CHelpProvider didn't get called anymore. And there
was this red message in the lower left corner: "No completions
available".

After a few hours of debugging the managed make sources I found the
following:
1. Content assist, F1 and hover help only work for source folders.
2. As long as no source folder is explicitly added the project's main
folder is implicitly considered a source folder.
3. As soon as a source folder is added the project's main folder ceases
to be a source folder.

Now my questions are:
- Are my conclusions 1.-3. correct?
- Is 1. a bug or a feature? I was surprised to find, that content assist
stops to work, but then again maybe I should have given more thought to
the wizard's warning that "the existing project source folder will be
replaced".

Thanks for your comments.



Norbert


Back to the top