Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] CDT textHover

Hey, folks,

A couple of observations/questions about CDT hover help:

In the current code, in org.eclipse.cdt.internal.ui.DefaultCEditorTextHover getHoverInfo() looks for function info in the CCompletionContributorManager class, which kinda commingles the hover and completion stuff. Since at present CDT hover and completion stuff is being done by different organisations, would it make sense to split these capabilities into separate classes? I've done that in Red Hat's copy of the code by replacing

IFunctionSummary fs = CCompletionContributorManager.getDefault().getFunctionInfo(expression);

with

IFunctionSummary fs = CTextHoverContributorManager.getDefault().getFunctionInfo(expression);

and adding a CTextHoverContributorManager class which looks for extensions to the textHovers extension point.

Next, my version of hover help relies on a collection of (at least for the moment) property files that, for example, describe glibc, GTK+, X, and whatever else, functions, and I'm planning to have the code use a private URLClassLoader to locate the files on a customisable path. (This allows the prop files to be replaced independant of Eclipse, as well as allowing users to add their own prop files.)

So my question is: Is there a standard place in Eclipse to put this kind of data? E.g., a lot of apps put stuff in /usr/share/whatever, and I was thinking my "default" prop files could go there, or in some Eclipse-standard equivalent.

The follow-on question is: How should I my path customisation be done? Should it be done through the CDT configure stuff? Using an environment vbl? Command-line opt? All of the above?

A third issue is that there appear to be a number (at least two that I've seen) CDT hover mechanisms being pursued. Is there a mechanism/protocol for allowing run-time selection among multiple extensions to the same extension point? Or maybe some sort of extension chain?

Any opinions?

Chris Moller
Senior Software Tinker
Red Hat



Back to the top