public interface LinkGenerator
RSyntaxTextArea
it is queried when the mouse is moved and
hyperlinks are enabled. If the user is not hovering over a "real" hyperlink
(e.g. "http://www.google.com"), the link generator is asked if a text region
at the mouse position should be considered a hyperlink. If so, a result
object is returned, describing exactly what region of text is the link, and
where it goes to.This interface is typically used by applications providing advanced support for programming languages, such as IDEs. For example, an implementation of this class could identify the token under the mouse position as a "variable," and the hyperlink returned would select the variable's declaration in the document.
限定符和类型 | 方法和说明 |
---|---|
LinkGeneratorResult |
isLinkAtOffset(RSyntaxTextArea textArea,
int offs)
If a region of text under the mouse position should be considered a
hyperlink, a result object is returned.
|
LinkGeneratorResult isLinkAtOffset(RSyntaxTextArea textArea, int offs)
textArea
- The text component.offs
- The offset in the document under the mouse position.null
if no link is at the
specified offset.