Search in sources :

Example 1 with ImpliedHyperlinkReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken in project mylyn.docs by eclipse.

the class MediaWikiLanguage method addStandardTokens.

@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
    tokenSyntax.add(new LineBreakToken());
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(tm)", "#8482"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(TM)", "#8482"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(c)", "#169"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(C)", "#169"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(r)", "#174"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(R)", "#174"));
    tokenSyntax.add(new ImageReplacementToken());
    tokenSyntax.add(new HyperlinkInternalReplacementToken());
    tokenSyntax.add(new HyperlinkExternalReplacementToken());
    tokenSyntax.add(new ImpliedHyperlinkReplacementToken());
    // horizontal rule //$NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new PatternLiteralReplacementToken("(?:(?<=^|\\w\\s)(----)(?=$|\\s\\w))", "<hr/>"));
    tokenSyntax.add(new org.eclipse.mylyn.wikitext.mediawiki.internal.token.EntityReferenceReplacementToken());
}
Also used : PatternLiteralReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.PatternLiteralReplacementToken) EntityReferenceReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken) HyperlinkExternalReplacementToken(org.eclipse.mylyn.wikitext.mediawiki.internal.token.HyperlinkExternalReplacementToken) LineBreakToken(org.eclipse.mylyn.wikitext.mediawiki.internal.token.LineBreakToken) HyperlinkInternalReplacementToken(org.eclipse.mylyn.wikitext.mediawiki.internal.token.HyperlinkInternalReplacementToken) ImpliedHyperlinkReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken) ImageReplacementToken(org.eclipse.mylyn.wikitext.mediawiki.internal.token.ImageReplacementToken)

Example 2 with ImpliedHyperlinkReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken in project mylyn.docs by eclipse.

the class TWikiLanguage method addStandardTokens.

@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
    // IMPORTANT NOTE: Most items below have order dependencies.  DO NOT REORDER ITEMS BELOW!!
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(tm)", "#8482"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(TM)", "#8482"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(c)", "#169"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(C)", "#169"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(r)", "#174"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(R)", "#174"));
    tokenSyntax.add(new LinkReplacementToken());
    tokenSyntax.add(new ImpliedHyperlinkReplacementToken());
    tokenSyntax.add(new ImpliedEmailLinkReplacementToken());
    tokenSyntax.add(new WikiWordReplacementToken());
    tokenSyntax.add(new IconReplacementToken());
    literalTokenSyntax.add(new ImpliedHyperlinkReplacementToken());
}
Also used : WikiWordReplacementToken(org.eclipse.mylyn.wikitext.twiki.internal.token.WikiWordReplacementToken) EntityReferenceReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken) ImpliedEmailLinkReplacementToken(org.eclipse.mylyn.wikitext.twiki.internal.token.ImpliedEmailLinkReplacementToken) IconReplacementToken(org.eclipse.mylyn.wikitext.twiki.internal.token.IconReplacementToken) ImpliedEmailLinkReplacementToken(org.eclipse.mylyn.wikitext.twiki.internal.token.ImpliedEmailLinkReplacementToken) LinkReplacementToken(org.eclipse.mylyn.wikitext.twiki.internal.token.LinkReplacementToken) ImpliedHyperlinkReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken)

Example 3 with ImpliedHyperlinkReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken in project mylyn.docs by eclipse.

the class CreoleLanguage method addStandardTokens.

@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
    // IMPORTANT NOTE: Most items below have order dependencies.  DO NOT REORDER ITEMS BELOW!!
    // line break //$NON-NLS-1$
    tokenSyntax.add(new PatternLineBreakReplacementToken("(\\\\\\\\)"));
    tokenSyntax.add(new LinkReplacementToken());
    tokenSyntax.add(new ImpliedHyperlinkReplacementToken());
}
Also used : PatternLineBreakReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken) LinkReplacementToken(org.eclipse.mylyn.wikitext.creole.internal.token.LinkReplacementToken) ImpliedHyperlinkReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken)

Example 4 with ImpliedHyperlinkReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken in project mylyn.docs by eclipse.

the class TracWikiLanguage method addStandardTokens.

@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
    // IMPORTANT NOTE: Most items below have order dependencies.  DO NOT REORDER ITEMS BELOW!!
    tokenSyntax.add(new BangEscapeToken());
    tokenSyntax.add(new LineBreakToken());
    // always starts at the start of a line or after a non-word character excluding '!' and '-' //$NON-NLS-1$
    tokenSyntax.beginGroup("(?:(?<=[\\s\\.\\\"'?!;:\\)\\(\\{\\}\\[\\]-])|^)(?:", 0);
    tokenSyntax.add(new MacroReplacementToken());
    tokenSyntax.add(new RevisionLogReplacementToken());
    tokenSyntax.add(new ChangesetLinkReplacementToken());
    tokenSyntax.add(new HyperlinkReplacementToken());
    tokenSyntax.add(new ImpliedHyperlinkReplacementToken());
    tokenSyntax.add(new TicketAttachmentLinkReplacementToken());
    tokenSyntax.add(new TicketLinkReplacementToken());
    tokenSyntax.add(new ReportLinkReplacementToken());
    tokenSyntax.add(new MilestoneLinkReplacementToken());
    tokenSyntax.add(new SourceLinkReplacementToken());
    tokenSyntax.add(new WikiLinkReplacementToken());
    if (configuration == null || configuration.isWikiWordLinking() == null || configuration.isWikiWordLinking()) {
        tokenSyntax.add(new WikiWordReplacementToken());
    }
    // $NON-NLS-1$
    tokenSyntax.endGroup(")(?=\\W|$)", 0);
}
Also used : ReportLinkReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.ReportLinkReplacementToken) ChangesetLinkReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.ChangesetLinkReplacementToken) LineBreakToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.LineBreakToken) MacroReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.MacroReplacementToken) TicketLinkReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.TicketLinkReplacementToken) TicketAttachmentLinkReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.TicketAttachmentLinkReplacementToken) WikiLinkReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.WikiLinkReplacementToken) HyperlinkReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.HyperlinkReplacementToken) ImpliedHyperlinkReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken) WikiWordReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.WikiWordReplacementToken) BangEscapeToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.BangEscapeToken) MilestoneLinkReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.MilestoneLinkReplacementToken) RevisionLogReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.RevisionLogReplacementToken) ImpliedHyperlinkReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken) SourceLinkReplacementToken(org.eclipse.mylyn.wikitext.tracwiki.internal.token.SourceLinkReplacementToken)

Example 5 with ImpliedHyperlinkReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken in project mylyn.docs by eclipse.

the class ImpliedHyperlinkReplacementTokenTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    token = new ImpliedHyperlinkReplacementToken();
    pattern = Pattern.compile(token.getPattern(0));
}
Also used : ImpliedHyperlinkReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken)

Aggregations

ImpliedHyperlinkReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken)5 EntityReferenceReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken)2 LinkReplacementToken (org.eclipse.mylyn.wikitext.creole.internal.token.LinkReplacementToken)1 HyperlinkExternalReplacementToken (org.eclipse.mylyn.wikitext.mediawiki.internal.token.HyperlinkExternalReplacementToken)1 HyperlinkInternalReplacementToken (org.eclipse.mylyn.wikitext.mediawiki.internal.token.HyperlinkInternalReplacementToken)1 ImageReplacementToken (org.eclipse.mylyn.wikitext.mediawiki.internal.token.ImageReplacementToken)1 LineBreakToken (org.eclipse.mylyn.wikitext.mediawiki.internal.token.LineBreakToken)1 PatternLineBreakReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken)1 PatternLiteralReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.PatternLiteralReplacementToken)1 BangEscapeToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.BangEscapeToken)1 ChangesetLinkReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.ChangesetLinkReplacementToken)1 HyperlinkReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.HyperlinkReplacementToken)1 LineBreakToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.LineBreakToken)1 MacroReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.MacroReplacementToken)1 MilestoneLinkReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.MilestoneLinkReplacementToken)1 ReportLinkReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.ReportLinkReplacementToken)1 RevisionLogReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.RevisionLogReplacementToken)1 SourceLinkReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.SourceLinkReplacementToken)1 TicketAttachmentLinkReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.TicketAttachmentLinkReplacementToken)1 TicketLinkReplacementToken (org.eclipse.mylyn.wikitext.tracwiki.internal.token.TicketLinkReplacementToken)1