use of org.eclipse.mylyn.wikitext.mediawiki.MediaWikiLanguage in project mylyn.docs by eclipse.
the class TableOfContentsBlock method processLineContent.
@Override
public int processLineContent(String line, int offset) {
if (blockLineNumber++ > 0) {
setClosed(true);
return 0;
}
if (!getMarkupLanguage().isFilterGenerativeContents()) {
OutlineParser outlineParser = new OutlineParser(new MediaWikiLanguage());
OutlineItem rootItem = outlineParser.parse(state.getMarkupContent());
emitToc(rootItem);
}
int start = matcher.start(1);
if (start > 0) {
setClosed(true);
}
return start;
}
use of org.eclipse.mylyn.wikitext.mediawiki.MediaWikiLanguage in project mylyn.docs by eclipse.
the class WikiTemplateResolverTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
TestWikiTemplateResolver resolverUnderTest = new TestWikiTemplateResolver();
resolverUnderTest.setWikiBaseUrl("http://wiki.eclipse.org");
Map<String, String> serverContent = new HashMap<>();
serverContent.put("http://wiki.eclipse.org/index.php?title=Template%3Abug&action=raw", BUG_TEMPLATE_CONTENT);
serverContent.put("http://wiki.eclipse.org/index.php?title=Test&action=raw", TEST_TEMPLATE_CONTENT);
serverContent.put("http://wiki.eclipse.org/index.php?title=Other%3ATest&action=raw", OTHER_TEMPLATE_CONTENT);
resolverUnderTest.setServerContent(serverContent);
MediaWikiLanguage markupLanguage = new MediaWikiLanguage();
markupLanguage.getTemplateProviders().add(resolverUnderTest);
this.templateProcessor = new TemplateProcessor(markupLanguage);
this.resolver = resolverUnderTest;
}
Aggregations