PreviousNextTracker indexSee it online !

(85/207) 1962715 - Calltips

Calltips are a tool for context-sensitive information access. The idea is to pop up a tooltip-like window containing documentation pertaining to the word or words at or near the text input cursor. For example, if I were coding OCaml and I were to type "List.iter" then summon a calltip I could get a tip containing the type signature and brief documentation for that function. (See the attached screenshot for this example in NEdit.)

I can imagine that some might question the need for this sort of feature when jEdit already has various dockable plugins that can do context-sensitive help. Calltips are still useful because a) many folks either don't have room for docked panes or b) they're already using them for other purposes. It's also quite beneficial to have the documentation *directly* beneath the code it applies to rather than relegated to a sidebar.

Since calltips look very similar to tooltips it is important to understand that they serve a different purpose and should behave differently. In particular, tooltips are generally viewed while mousing, but calltips are viewed while typing. I implemented calltips in NEdit and these are the behaviors that I settled on for best usability:
* They only appear when summoned
* They only vanish when either
a) they are explicitly dismissed (usually with the Esc key)
b) keyboard focus leaves the edit pane.
This implies that the user can move the cursor around without dismissing an existing calltip. This is very useful when the user wants to temporarily see text that's under the calltip without dismissing it.
* They must not obscure text on the line the cursor is on
* They should move vertically (but not horizontally) with the cursor
* They should stay entirely on-screen whenever possible

I'm not 100% sure, but I think calltips can be implemented as a plugin. All that really needs to be provided is the mechanism for creating calltips, though it might also be a good idea to define a canonical format and provide a parser for calltip files.

In addition to NEdit, the Scintilla editor widget provides calltips. There are probably others as well. I think the idea may have originated with Visual Studio, but I've never used it so I'm not sure. In any case, it's a great productivity aid and I'd love to see it in jEdit.

Submitted n8gray - 2008-05-13 - 00:02:30z Assigned nobody
Priority 5 Category None
Status Open Group None
Resolution None Visibility No


2010-04-21 - 09:58:01z
This is really needed. I don't understand why there is such a lack of interest here... How do people get hints and code completion?
2010-04-21 - 10:02:27z
There is no lack of interest. The main problem is, who will provide the content of the calltips? How does jEdit / plugin know where to find the function being called and what it's signature is?


2008-05-13 - 00:02:31z