Examples of ParsingPage


Examples of fitnesse.wikitext.parser.ParsingPage

  }

  @Override
  public String getHtml() {
    String content = getDecoratedContent();
    ParsingPage parsingPage = new ParsingPage(new WikiSourcePage(sourcePage), variableSource);
    Symbol syntaxTree = Parser.make(parsingPage, content).parse();
    return new HtmlTranslator(parsingPage.getPage(), parsingPage).translateTree(syntaxTree);
  }
View Full Code Here

Examples of fitnesse.wikitext.parser.ParsingPage

  }

  protected List<String> getItemsFromPage(WikiPage page) {
    if (page instanceof WikitextPage) {
      Symbol tree = ((WikitextPage) page).getSyntaxTree();
      ParsingPage parsingPage = ((WikitextPage) page).getParsingPage();
      return new Paths(new HtmlTranslator(new WikiSourcePage(page), parsingPage)).getPaths(tree);
    }
    return Collections.emptyList();
  }
View Full Code Here

Examples of fitnesse.wikitext.parser.ParsingPage

      this.urlParams = urlParams;
  }

  @Override
  public String getVariable(String name) {
    ParsingPage parsingPage = getParsingPage();
    Maybe<String> variable = parsingPage.findVariable(name);
    if (variable.isNothing()) return null;

    Parser parser = Parser.make(parsingPage, "", SymbolProvider.variableDefinitionSymbolProvider);
    return new HtmlTranslator(null, parsingPage).translate(parser.parseWithParent(variable.getValue(), null));
  }
View Full Code Here

Examples of fitnesse.wikitext.parser.ParsingPage

  }

  private void parse() {
    if (syntaxTree == null) {
      // This is the only page where we need a VariableSource
      parsingPage = new ParsingPage(new WikiSourcePage(this), new UrlPathVariableSource(
              getVariableSource(), urlParams));
      syntaxTree = Parser.make(parsingPage, getData().getContent()).parse();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.