Extending hovers or pop-ups for the Ruby Editor
From Aptana Development
This help page explains how to use the org.rubypeople.rdt.ui.rubyEditorTextHovers extension point to contribute text hovers or pop-ups to the Ruby Editor.
Instructions
The org.rubypeople.rdt.ui.rubyEditorTextHovers extension point plug-in replaces the less flexible less flexible textHoverProvider extension point. The new extension point is defined in an XML file:
org.rubypeople.rdt.ui/schema/rubyEditorTextHovers.exsd (an xml file)
The org.rubypeople.rdt.ui.rubyEditorTextHovers extension point allows hovers to provide HTML based popups, or syntax colored source pop-ups, rather than just plain text. Additionally, this extension point now supports "masks", which can provide different hovers if a user holds down Shift, Ctrl, or other special keys.
In addition to adding the extension, the Ruby Editor now has a new set of hovers:
- RubySourceHover - This is activated by holding down shift and then hovering over an element in source code (like a method call, reference to a variable, any declarations). It shows the source code for the declaration of the element, in the same font as the editor and with syntax coloring.
- BestMatchHover - This hover cycles through all the hovers and returns the first one to give a match. It's the one on by default when you hover over elements in the code.
- RiDocHover - The upgraded version of the old hover we had for the old extension. This actually invokes RI under the hood, and if there's any results it will use them. (Not very good, it hardly ever gets results right now).
- AnnotationHover - Provides hovers for annotations in the code.
- ProblemHover - Provides hovers for problems in the code.
- CommentHover - Provides the ruby documentation/comment for an element.


