|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage
org.eclipse.mylyn.wikitext.core.parser.markup.AbstractMarkupLanguage
org.eclipse.mylyn.wikitext.tracwiki.core.TracWikiLanguage
public class TracWikiLanguage
An implementation of the TracWiki markup language.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage |
---|
MarkupLanguage.PatternBasedSyntax |
Field Summary |
---|
Fields inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.AbstractMarkupLanguage |
---|
blocks, paragraphBreakingBlocks, phraseModifierSyntax, tokenSyntax |
Fields inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage |
---|
configuration, internalLinkPattern |
Constructor Summary | |
---|---|
TracWikiLanguage()
|
Method Summary | |
---|---|
protected void |
addStandardBlocks(List<Block> blocks,
List<Block> paragraphBreakingBlocks)
|
protected void |
addStandardPhraseModifiers(MarkupLanguage.PatternBasedSyntax phraseModifierSyntax)
|
protected void |
addStandardTokens(MarkupLanguage.PatternBasedSyntax tokenSyntax)
|
boolean |
computeInternalLinkExists(String link)
for the purpose of converting wiki words into links, determine if the wiki word exists. |
protected Block |
createParagraphBlock()
|
String |
getServerUrl()
the server URL, for example http://trac.edgewall.org/ from which links may be derrived, such as
http://trac.edgewall.org/wiki/WikiPage or http://trac.edgewall.org/tickets/1 |
boolean |
isAutoLinking()
Indicate if the markup should match WikiWords as hyperlinks. |
void |
setAutoLinking(boolean autoLinking)
Indicate if the markup should match WikiWords as hyperlinks. |
void |
setServerUrl(String url)
set the server URL, for example http://trac.edgewall.org/ from which links may be derrived, such as
http://trac.edgewall.org/wiki/WikiPage or http://trac.edgewall.org/tickets/1 |
String |
toChangesetHref(String changesetId,
String restriction)
convert a changeset id to a hyperlink based on the server url |
String |
toInternalHref(String pageName)
Convert a page name to an href to the page. |
String |
toMilestoneHref(String milestoneId)
convert a milestone id to a hyperlink based on the server url |
String |
toReportHref(String reportId)
convert a report id to a hyperlink based on the server url |
String |
toRevisionLogHref(String revision1,
String revision2,
String restriction)
convert a revisions to a revision log hyperlink based on the server url |
String |
toSourceBrowserHref(String source,
String revision,
String line)
create an URL to the source browser |
String |
toTicketAttachmentHref(String ticketId,
String attachment)
create an URL to an attachment ticket based on the server url |
String |
toTicketHref(String ticketId,
String commentNumber)
convert a ticket id to a hyperlink based on the server url |
Methods inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.AbstractMarkupLanguage |
---|
addBlockExtensions, addPhraseModifierExtensions, addTokenExtensions, clearLanguageSyntax, getBlocks, getParagraphBreakingBlocks, getPhraseModifierSyntax, getReplacementTokenSyntax, initializeBlocks, initializePhraseModifiers, initializeSyntax, initializeTokens |
Methods inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage |
---|
clone, configure, createState, emitMarkupLine, emitMarkupLine, emitMarkupText, getExtendsLanguage, getIdGenerationStrategy, getInternalLinkPattern, getName, isBlocksOnly, isDetectingRawHyperlinks, isEmptyLine, isEnableMacros, isFilterGenerativeContents, processContent, setBlocksOnly, setEnableMacros, setExtendsLanguage, setFilterGenerativeContents, setInternalLinkPattern, setName, startBlock |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TracWikiLanguage()
Method Detail |
---|
public String toInternalHref(String pageName)
pageName
- the name of the page to target
MarkupLanguage.getInternalLinkPattern()
public String toTicketHref(String ticketId, String commentNumber)
server url
ticketId
- the id of the ticketcommentNumber
- the comment number or null if the url should not reference a specific commentpublic String toChangesetHref(String changesetId, String restriction)
server url
changesetId
- the changeset idrestriction
- the restriction, or null if there is no restriction. eg: "trunk"public String toRevisionLogHref(String revision1, String revision2, String restriction)
server url
revision1
- the first revisionrevision2
- the second revisionrestriction
- the restriction, or null if there is no restriction. eg: "trunk"public String toReportHref(String reportId)
server url
reportId
- the id of the reportpublic String toMilestoneHref(String milestoneId)
server url
milestoneId
- the id of the milesontepublic String toTicketAttachmentHref(String ticketId, String attachment)
server url
ticketId
- the id of the ticketattachment
- the name of the attachmentpublic String toSourceBrowserHref(String source, String revision, String line)
source
- the source to be viewedrevision
- the revision, or null if there is no revisionline
- the line, or null if there is no linepublic boolean computeInternalLinkExists(String link)
WikiWordReplacementToken
public boolean isAutoLinking()
public void setAutoLinking(boolean autoLinking)
public void setServerUrl(String url)
http://trac.edgewall.org/
from which links may be derrived, such as
http://trac.edgewall.org/wiki/WikiPage
or http://trac.edgewall.org/tickets/1
url
- the url, or null if it is unknown.public String getServerUrl()
http://trac.edgewall.org/
from which links may be derrived, such as
http://trac.edgewall.org/wiki/WikiPage
or http://trac.edgewall.org/tickets/1
setServerUrl(String)
protected void addStandardBlocks(List<Block> blocks, List<Block> paragraphBreakingBlocks)
addStandardBlocks
in class AbstractMarkupLanguage
protected void addStandardPhraseModifiers(MarkupLanguage.PatternBasedSyntax phraseModifierSyntax)
addStandardPhraseModifiers
in class AbstractMarkupLanguage
protected void addStandardTokens(MarkupLanguage.PatternBasedSyntax tokenSyntax)
addStandardTokens
in class AbstractMarkupLanguage
protected Block createParagraphBlock()
createParagraphBlock
in class AbstractMarkupLanguage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |