This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 92815 - Improve editor tooltips
Summary: Improve editor tooltips
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: David Strupl
Keywords: API
Depends on:
Blocks: 59336 122422 126034 133777 136473
  Show dependency tree
Reported: 2007-01-19 09:54 UTC by Miloslav Metelka
Modified: 2011-11-25 09:45 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2007-01-19 09:54:10 UTC
The present API/SPI for handling tooltips has certain difficulties:
1) As the tooltips are registered as annotations (org.openide.text.Annotation)
it's not clear (especially for new developers) how should it whole work.

2) Tooltip evaluation does not run in AWT thread.
 The Annotation is registered to annoatable which is a document. However often
the tooltip annotations need an access to component as well. The annotations
processing does not run in AWT (historical reasons - since the primary clients
of the tooltips were using JMI that might lock AWT thread for rather long time).
However access to a pane needs to be done in AWT (e.g. now there is even an
assertion in impl of EditorCookie.getOpenedPanes() that prohibits call outside AWT).
Such clients need first reschedule from RP to AWT to get the pane and then
eventually reschedule back from AWT into an RP to finish potentially long
IMHO it would be better to invoke in AWT primarily but let the computation to
use another thread eventually. The same approach is used e.g. in Code Completion

3) The context information might be enhanced. There should be a final class
providing all the necessary context where the tooltip is being evaluated
(including the editor pane).

4) The unified registration of tooltip SPI providers through the MimeLookup
could be used to sync with other editor APIs and provide global/mime-specific
Comment 1 Vitezslav Stejskal 2009-12-02 09:27:11 UTC
Making this an umbrella issue for tooltip related problems and requests.
Comment 2 David Strupl 2011-11-25 09:45:40 UTC
Closing old (and presumably obsolete) tasks assigned to me. If something is still needed please reopen...