@MimeLocation(subfolderName="HyperlinkProviders") public interface HyperlinkProviderExt
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.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.
Modifier and Type | Method and Description |
---|---|
int[] |
getHyperlinkSpan(Document doc,
int offset,
HyperlinkType type)
Should determine the span of hyperlink on given offset.
|
Set<HyperlinkType> |
getSupportedHyperlinkTypes()
Returns all hyperlink types that are supported by this HyperlinkProvider.
|
String |
getTooltipText(Document doc,
int offset,
HyperlinkType type)
Get a short description/tooltip corresponding to the given offset.
|
boolean |
isHyperlinkPoint(Document doc,
int offset,
HyperlinkType type)
Should determine whether there should be a hyperlink on the given offset
in the given document.
|
void |
performClickAction(Document doc,
int offset,
HyperlinkType type)
The implementor should perform an action
corresponding to clicking on the hyperlink on the given offset.
|
Set<HyperlinkType> getSupportedHyperlinkTypes()
boolean isHyperlinkPoint(Document doc, int offset, HyperlinkType type)
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)type
- the hyperlink typeint[] getHyperlinkSpan(Document doc, int offset, HyperlinkType type)
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)type
- the hyperlink typevoid performClickAction(Document doc, int offset, HyperlinkType type)
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)type
- the hyperlink typeString getTooltipText(Document doc, int offset, HyperlinkType type)
null
if there should
be no tooltip.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)type
- the hyperlink type