public class XMLHyperlinkSource
extends java.lang.Object
implements gatchan.jedit.hyperlinks.HyperlinkSource
Constructor and Description |
---|
XMLHyperlinkSource() |
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 |
getHyperlink(org.gjt.sp.jedit.Buffer buffer,
int offset,
XmlParsedData data,
XmlTag asset,
boolean isHTML)
Returns the hyperlink for the given offset.
|
gatchan.jedit.hyperlinks.Hyperlink |
getHyperlinkForAttribute(org.gjt.sp.jedit.Buffer buffer,
int offset,
java.lang.String tagNS,
java.lang.String tagLocalName,
java.lang.String attNS,
java.lang.String attLocalName,
java.lang.String attValue,
XmlParsedData data,
XmlTag tag,
XmlDocument.Attribute att,
boolean isHTML)
recognize hyperlink attributes by their parent element's
namespace:localname and/or their namespace:localname
|
gatchan.jedit.hyperlinks.Hyperlink |
getHyperlinkForAttribute(org.gjt.sp.jedit.Buffer buffer,
int offset,
XmlParsedData data,
XmlTag sideKickTag,
XmlDocument.Attribute att,
boolean isHTML)
get an hyperlink for an identified XML attribute
|
gatchan.jedit.hyperlinks.Hyperlink |
getHyperlinkForIDREF(org.gjt.sp.jedit.Buffer buffer,
XmlParsedData data,
java.lang.String id,
XmlDocument.Attribute att)
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,
XmlDocument.Attribute att)
creates an hyperlink to the location of the element with id (in same or another buffer)
|
HTMLHyperlinkSource.IsHyperLink |
isHyperlink(org.gjt.sp.jedit.Buffer buffer,
int offset,
java.lang.String tagNS,
java.lang.String tagLocalName,
java.lang.String attNS,
java.lang.String attLocalName,
java.lang.String attValue,
int attStart)
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,
XmlDocument.Attribute att,
java.lang.String href,
int gotoLine,
int gotoCol)
create an hyperlink for attribute att.
|
gatchan.jedit.hyperlinks.Hyperlink |
newJEditOpenFileHyperlink(org.gjt.sp.jedit.Buffer buffer,
XmlDocument.Attribute att,
java.lang.String href)
create an hyperlink for attribute att.
|
java.lang.String |
resolve(java.lang.String uri,
org.gjt.sp.jedit.Buffer buffer,
int offset,
XmlParsedData data,
XmlTag tag,
boolean useXmlBase)
resolve a potentially relative uri using xml:base attributes,
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 getHyperlink(org.gjt.sp.jedit.Buffer buffer, int offset, XmlParsedData data, XmlTag asset, boolean isHTML)
buffer
- the bufferoffset
- the offsetdata
- the parsed data for this bufferasset
- the tag at offsetisHTML
- is buffer mode html parsed as xml (to fallback to HTML attributes recognised as hrefs)public gatchan.jedit.hyperlinks.Hyperlink getHyperlinkForAttribute(org.gjt.sp.jedit.Buffer buffer, int offset, XmlParsedData data, XmlTag sideKickTag, XmlDocument.Attribute att, boolean isHTML)
buffer
- current bufferoffset
- offset where an hyperlink is required in current bufferdata
- sidekick tree for current buffersideKickTag
- element containing offsetatt
- parsed attributeisHTML
- we are dealing with an HTML bufferpublic gatchan.jedit.hyperlinks.Hyperlink getHyperlinkForIDREF(org.gjt.sp.jedit.Buffer buffer, XmlParsedData data, java.lang.String id, XmlDocument.Attribute att)
buffer
- current bufferdata
- sidekick treeid
- id we are looking foratt
- parsed attribute (for hyperlink boundaries)public gatchan.jedit.hyperlinks.Hyperlink getHyperlinkForIDREFS(org.gjt.sp.jedit.Buffer buffer, int offset, XmlParsedData data, java.lang.String attValue, XmlDocument.Attribute att)
buffer
- current bufferoffset
- offset of required hyperlinkdata
- sidekick treeattValue
- ids in the attributeatt
- parsed attribute (for hyperlink boundaries)public HTMLHyperlinkSource.IsHyperLink isHyperlink(org.gjt.sp.jedit.Buffer buffer, int offset, java.lang.String tagNS, java.lang.String tagLocalName, java.lang.String attNS, java.lang.String attLocalName, java.lang.String attValue, int attStart)
public gatchan.jedit.hyperlinks.Hyperlink getHyperlinkForAttribute(org.gjt.sp.jedit.Buffer buffer, int offset, java.lang.String tagNS, java.lang.String tagLocalName, java.lang.String attNS, java.lang.String attLocalName, java.lang.String attValue, XmlParsedData data, XmlTag tag, XmlDocument.Attribute att, boolean isHTML)
public java.lang.String resolve(java.lang.String uri, org.gjt.sp.jedit.Buffer buffer, int offset, XmlParsedData data, XmlTag tag, boolean useXmlBase)
uri
- text of uri to reachbuffer
- current bufferoffset
- offset in current buffer where an hyperlink is requireddata
- SideKick parsed datatag
- SideKick assetuseXmlBase
- should xml:base attribute be used to resolve uri (only for XML!)public gatchan.jedit.hyperlinks.Hyperlink newJEditOpenFileHyperlink(org.gjt.sp.jedit.Buffer buffer, XmlDocument.Attribute att, java.lang.String href)
buffer
- current bufferatt
- parsed attributehref
- uri to openpublic gatchan.jedit.hyperlinks.Hyperlink newJEditOpenFileAndGotoHyperlink(org.gjt.sp.jedit.Buffer buffer, XmlDocument.Attribute att, java.lang.String href, int gotoLine, int gotoCol)
buffer
- current bufferatt
- parsed attributehref
- uri to opengotoLine
- target line in buffergotoCol
- target column in bufferpublic static gatchan.jedit.hyperlinks.HyperlinkSource create()