2

Okay,

I have this slightly annoying problem with the code assistance of Eclipse CDT. Whenever you hover the mouse over a function, a window pops up to show you the comment of that function. That is good.

Now, unfortunately, when the source file for that function is also available, it shows that instead of the comment. But I really don't want to see the source of the function, I always want to see the comment in the header. Who thought it would be a good idea to show source code when you just want a short description of what a function does? Not especially well suited for C++, is it? ;)

And another issue: This window that pops up when you hover with mouse over a function... I really don't want to hover my mouse everytime I want to have that window.

I think the solution to my problems would be if there was a way to always show the header comment of a function as soon as the text cursor is on that function. Maybe in a permanent window that I can place wherever I want. Is there a way to achieve this? Maybe a plugin?

And if there is no way to do that: What is the shortcut for opening that window and how can I force it to show the header comment instead of the source code?

TheSHEEEP
  • 2,961
  • 2
  • 31
  • 57

1 Answers1

0

From this thread, it looks like the hover issue is intentional design. It probably results from eclipse originally being a Java IDE (where function definition equals declaration in source code).

The only workaround seems to be to exclude the source code by compiling it away into a *.lib without debug information and including it via lib and headers. Which is kind of impossible when your project is the one that generates the library in the first place.

What you could do is to make Documentation in the sense of the property page avaliable. That seems somewhat complicated from what I found in the eclipse forums:

The 'Documentation Hover' type listed in the preference page only displays help content which has been contributed to the org.eclipse.cdt.ui.CHelpProvider extension point.

Community
  • 1
  • 1
starturtle
  • 699
  • 8
  • 25