public class HTMLHyperlinkSource
extends java.lang.Object
implements gatchan.jedit.hyperlinks.HyperlinkSource
Modifier and Type | Class and Description |
---|---|
static class |
HTMLHyperlinkSource.IsHyperLink |
Constructor and Description |
---|
HTMLHyperlinkSource() |
Modifier and Type | Method and Description |
---|---|
static gatchan.jedit.hyperlinks.HyperlinkSource |
create() |
gatchan.jedit.hyperlinks.Hyperlink |
getHyperlink(org.gjt.sp.jedit.Buffer buffer,
int offset)
Returns the hyperlink for the given offset.
|
gatchan.jedit.hyperlinks.Hyperlink |
getHyperlinkForAttribute(org.gjt.sp.jedit.Buffer buffer,
int offset,
java.lang.String tagLocalName,
java.lang.String attLocalName,
java.lang.String attValue,
XmlParsedData data,
HtmlDocument.Tag tag,
HtmlDocument.Attribute att,
boolean quoted)
recognize hyperlink attributes by their parent element's
name and/or their name.
|
gatchan.jedit.hyperlinks.Hyperlink |
getHyperlinkForAttribute(org.gjt.sp.jedit.Buffer buffer,
int offset,
XmlParsedData data,
HtmlDocument.Tag startTag,
HtmlDocument.Attribute att)
get an hyperlink for an identified HTML attribute
|
gatchan.jedit.hyperlinks.Hyperlink |
getHyperlinkForIDREF(org.gjt.sp.jedit.Buffer buffer,
XmlParsedData data,
java.lang.String id,
HtmlDocument.Attribute att,
boolean quoted)
creates an hyperlink to the location of the element with id (in same or another buffer).
|
gatchan.jedit.hyperlinks.Hyperlink |
getHyperlinkForIDREFS(org.gjt.sp.jedit.Buffer buffer,
int offset,
XmlParsedData data,
java.lang.String attValue,
HtmlDocument.Attribute att,
boolean quoted)
creates an hyperlink to the location of the element with id (in same or another buffer)
|
sidekick.util.Location |
getNamedAnchorLocation(XmlParsedData data,
java.lang.String name) |
static HTMLHyperlinkSource.IsHyperLink |
isHyperlinkAttribute(org.gjt.sp.jedit.Buffer buffer,
int offset,
java.lang.String tagLocalName,
java.lang.String attLocalName,
int attStart,
java.lang.String attValue)
recognize hyperlink attributes by their parent element's
namespace:localname and/or their namespace:localname
|
gatchan.jedit.hyperlinks.Hyperlink |
newJEditOpenFileAndGotoHyperlink(org.gjt.sp.jedit.Buffer buffer,
HtmlDocument.Attribute att,
java.lang.String href,
int gotoLine,
int gotoCol,
boolean quoted)
create an hyperlink for attribute att.
|
gatchan.jedit.hyperlinks.Hyperlink |
newJEditOpenFileHyperlink(org.gjt.sp.jedit.Buffer buffer,
HtmlDocument.Attribute att,
java.lang.String href,
boolean quoted)
create an hyperlink for attribute att.
|
java.lang.String |
resolve(java.lang.String uri,
org.gjt.sp.jedit.Buffer buffer,
int offset,
XmlParsedData data)
resolve a potentially relative uri using HTML BASE element,
the buffer's URL, xml.Resolver.
|
public gatchan.jedit.hyperlinks.Hyperlink getHyperlink(org.gjt.sp.jedit.Buffer buffer, int offset)
getHyperlink
in interface gatchan.jedit.hyperlinks.HyperlinkSource
buffer
- the bufferoffset
- the offsetpublic gatchan.jedit.hyperlinks.Hyperlink getHyperlinkForAttribute(org.gjt.sp.jedit.Buffer buffer, int offset, XmlParsedData data, HtmlDocument.Tag startTag, HtmlDocument.Attribute att)
buffer
- current bufferoffset
- offset where an hyperlink is required in current bufferdata
- sidekick tree for current bufferstartTag
- element containing offsetatt
- parsed attributepublic gatchan.jedit.hyperlinks.Hyperlink getHyperlinkForIDREF(org.gjt.sp.jedit.Buffer buffer, XmlParsedData data, java.lang.String id, HtmlDocument.Attribute att, boolean quoted)
buffer
- current bufferdata
- sidekick treeid
- id we are looking foratt
- parsed attribute (for hyperlink boundaries)quoted
- is the value inside quotes ?public gatchan.jedit.hyperlinks.Hyperlink getHyperlinkForIDREFS(org.gjt.sp.jedit.Buffer buffer, int offset, XmlParsedData data, java.lang.String attValue, HtmlDocument.Attribute att, boolean quoted)
buffer
- current bufferoffset
- offset of required hyperlinkdata
- sidekick treeattValue
- ids in the attributeatt
- parsed attribute (for hyperlink boundaries)quoted
- is the value inside quotes ?public gatchan.jedit.hyperlinks.Hyperlink getHyperlinkForAttribute(org.gjt.sp.jedit.Buffer buffer, int offset, java.lang.String tagLocalName, java.lang.String attLocalName, java.lang.String attValue, XmlParsedData data, HtmlDocument.Tag tag, HtmlDocument.Attribute att, boolean quoted)
public static HTMLHyperlinkSource.IsHyperLink isHyperlinkAttribute(org.gjt.sp.jedit.Buffer buffer, int offset, java.lang.String tagLocalName, java.lang.String attLocalName, int attStart, java.lang.String attValue)
public java.lang.String resolve(java.lang.String uri, org.gjt.sp.jedit.Buffer buffer, int offset, XmlParsedData data)
uri
- text of uri to reachbuffer
- current bufferoffset
- offset in current buffer where an hyperlink is requireddata
- SideKick parsed datapublic gatchan.jedit.hyperlinks.Hyperlink newJEditOpenFileHyperlink(org.gjt.sp.jedit.Buffer buffer, HtmlDocument.Attribute att, java.lang.String href, boolean quoted)
buffer
- current bufferatt
- parsed attributehref
- uri to openquoted
- is the value inside quotes ?public gatchan.jedit.hyperlinks.Hyperlink newJEditOpenFileAndGotoHyperlink(org.gjt.sp.jedit.Buffer buffer, HtmlDocument.Attribute att, java.lang.String href, int gotoLine, int gotoCol, boolean quoted)
buffer
- current bufferatt
- parsed attributehref
- uri to opengotoLine
- target line in buffergotoCol
- target column in bufferquoted
- is the value inside quotes ?public sidekick.util.Location getNamedAnchorLocation(XmlParsedData data, java.lang.String name)
public static gatchan.jedit.hyperlinks.HyperlinkSource create()