Search code examples
eclipseeclipse-cdt

Eclipse - pointer to function parameters hints


Showing parameters hint of a function is very practical thing and good way to save time. Is there a way how Eclipse display parameters hits for a pointer to function.

struct {
    void (*bar)(p1, p2, p3...);
} foo;
foo.bar("Ctrl+Space")

report the following error

java.lang.ClassCastException: org.eclipse.cdt.internal.core.index.composite.c.CompositeCField cannot be cast to [Lorg.eclipse.cdt.core.dom.ast.IBinding;

Solution

  • The ClassCastException is being fixed in bug 517954 which Jonah kindly filed.

    However, the ClassCastException is not the reason for having no parameter hints. Showing parameter hints based on a function pointer's type is just something that hasn't been implemented in CDT. Bug 517978 is now on file for that.