@MimeLocation(subfolderName="HyperlinkProviders") public interface HyperlinkProvider
The providers need to be registered.
For NetBeans IDE, the default approach is to use System FileSystem.
The HyperlinkProvider(s) should be registered as ".instance" objects under
Editors/<mime-type>/HyperlinkProviders
directory.
Please see org.netbeans.lib.editor.hyperlink.spi.HyperlinkProviderManager
for more details.
Note: there is no assurance on the order of calling of the methods in this class. The callers may call the methods in any order and even do not call some of these methods at all.
Related documentation
Modifier and Type | Method and Description |
---|---|
int[] |
getHyperlinkSpan(Document doc,
int offset)
Should determine the span of hyperlink on given offset.
|
boolean |
isHyperlinkPoint(Document doc,
int offset)
Should determine whether there should be a hyperlink on the given offset
in the given document.
|
void |
performClickAction(Document doc,
int offset)
The implementor should perform an action
corresponding to clicking on the hyperlink on the given offset.
|
boolean isHyperlinkPoint(Document doc, int offset)
doc
- document on which to operate.offset
- >=0 offset to test (it generally should be offset < doc.getLength(), but
the implementations should not depend on it)int[] getHyperlinkSpan(Document doc, int offset)
doc
- document on which to operate.offset
- >=0 offset to test (it generally should be offset < doc.getLength(), but
the implementations should not depend on it)void performClickAction(Document doc, int offset)
doc
- document on which to operate.offset
- >=0 offset to test (it generally should be offset < doc.getLength(), but
the implementations should not depend on it)