public ParsingPage copyForNamedPage(SourcePage namedPage) { return new ParsingPage( this.page, namedPage, this.variableSource, this.cache); }
public ParsingPage copyForNamedPage(SourcePage namedPage) { return new ParsingPage( this.page, namedPage, this.variableSource, this.cache); }
String getHtmlFor(String input) { SourcePage page = new DummySourcePage(); Symbol list = Parser.make(new ParsingPage(page), input).parse(); return new HtmlTranslator(page, new ParsingPage(page)).translateTree(list); }
String getHtmlFor(String input) { SourcePage page = new DummySourcePage(); Symbol list = Parser.make(new ParsingPage(page), input).parse(); return new HtmlTranslator(page, new ParsingPage(page)).translateTree(list); }
@Override public void process(WikiPage currentPage) { this.currentPage = currentPage; String content = currentPage.getData().getContent(); Symbol syntaxTree = Parser.make( new ParsingPage(new WikiSourcePage(currentPage)), content, SymbolProvider.refactoringProvider) .parse(); syntaxTree.walkPreOrder(this); }
@Override public void process(WikiPage currentPage) { this.currentPage = currentPage; String content = currentPage.getData().getContent(); Symbol syntaxTree = Parser.make( new ParsingPage(new WikiSourcePage(currentPage)), content, SymbolProvider.refactoringProvider) .parse(); syntaxTree.walkPreOrder(this); }
@Override public void process(WikiPage currentPage) { PageData data = currentPage.getData(); String content = data.getContent(); Symbol syntaxTree = Parser.make( new ParsingPage(new WikiSourcePage(currentPage)), content, SymbolProvider.refactoringProvider) .parse(); this.currentPage = currentPage; syntaxTree.walkPreOrder(walker); String newContent = new WikiTranslator(new WikiSourcePage(currentPage)).translateTree(syntaxTree); boolean pageHasChanged = !newContent.equals(content); if (pageHasChanged) { data.setContent(newContent); currentPage.commit(data); } }
@Override public void process(WikiPage currentPage) { PageData data = currentPage.getData(); String content = data.getContent(); Symbol syntaxTree = Parser.make( new ParsingPage(new WikiSourcePage(currentPage)), content, SymbolProvider.refactoringProvider) .parse(); this.currentPage = currentPage; syntaxTree.walkPreOrder(walker); String newContent = new WikiTranslator(new WikiSourcePage(currentPage)).translateTree(syntaxTree); boolean pageHasChanged = !newContent.equals(content); if (pageHasChanged) { data.setContent(newContent); currentPage.commit(data); } }
public static ParsingPage makeParsingPage(BaseWikitextPage page) { ParsingPage.Cache cache = new ParsingPage.Cache(); VariableSource compositeVariableSource = new CompositeVariableSource( new ApplicationVariableSource(page.variableSource), new PageVariableSource(page), new UserVariableSource(page.variableSource), cache, new ParentPageVariableSource(page), page.variableSource); return new ParsingPage(new WikiSourcePage(page), compositeVariableSource, cache); }
public static ParsingPage makeParsingPage(BaseWikitextPage page) { ParsingPage.Cache cache = new ParsingPage.Cache(); VariableSource compositeVariableSource = new CompositeVariableSource( new ApplicationVariableSource(page.variableSource), new PageVariableSource(page), new UserVariableSource(page.variableSource), cache, new ParentPageVariableSource(page), page.variableSource); return new ParsingPage(new WikiSourcePage(page), compositeVariableSource, cache); }