Package org.eclipse.xtext.xdoc.xdoc

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile


    validate("codeRefTest.html", name(file.getMainSection()));
  }

  @Override
  public void testComment() throws Exception {
    XdocFile file = pTest.getDocFromFile(ParserTest.TEST_FILE_DIR + "commentTest.xdoc");
    generate(file.getMainSection());
    assertGenerated(file.getMainSection());
    validate("commentTest.html", name(file.getMainSection()));
  }
View Full Code Here


    validate("commentTest.html", name(file.getMainSection()));
  }

  @Override
  public void testLink() throws Exception {
    XdocFile file = pTest.getDocFromFile(ParserTest.TEST_FILE_DIR + "linkTest.xdoc");
    generate(file.getMainSection());
    assertGenerated(file.getMainSection());
    validate("linkTest.html", name(file.getMainSection()));
  }
View Full Code Here

    validate("linkTest.html", name(file.getMainSection()));
  }

  @Override
  public void testRefText() throws Exception {
    XdocFile file = pTest.getDocFromFile(ParserTest.TEST_FILE_DIR + "namedRefAndTextTest.xdoc");
    generate(file.getMainSection());
    assertGenerated(file.getMainSection());
    validate("namedRefAndTextTest.html", name(file.getMainSection()));
  }
View Full Code Here

    validate("namedRefAndTextTest.html", name(file.getMainSection()));
  }

  @Override
  public void testNestedList() throws Exception {
    XdocFile file = pTest.getDocFromFile(ParserTest.TEST_FILE_DIR + "nestedListTest.xdoc");
    generate(file.getMainSection());
    assertGenerated(file.getMainSection());
    validate("nestedListTest.html", name(file.getMainSection()));
  }
View Full Code Here

    validate("nestedListTest.html", name(file.getMainSection()));
  }

  @Override
  public void testSimpleRef() throws Exception {
    XdocFile file = pTest.getDocFromFile(ParserTest.TEST_FILE_DIR + "simpleRefTest.xdoc");
    generate(file.getMainSection());
    assertGenerated(file.getMainSection());
    validate("simpleRefTest.html", name(file.getMainSection()));
  }
View Full Code Here

    validate("simpleRefTest.html", name(file.getMainSection()));
  }

  @Override
  public void testTable() throws Exception {
    XdocFile file = pTest.getDocFromFile(ParserTest.TEST_FILE_DIR + "table.xdoc");
    generate(file.getMainSection());
    assertGenerated(file.getMainSection());
    validate("table.html", name(file.getMainSection()));
  }
View Full Code Here

    XtextResourceSet set = get(XtextResourceSet.class);
    Resource res = set.getResource(URI.createURI(ParserTest.TEST_FILE_DIR + "01-twoChapters.xdoc"), true);
    Chapter chapter0 = (Chapter) ((XdocFile) getModel((XtextResource)res)).getMainSection();
    res = set.getResource(URI.createURI(ParserTest.TEST_FILE_DIR + "02-twoChapters.xdoc"), true);
    Chapter chapter1 = (Chapter) ((XdocFile) getModel((XtextResource)res)).getMainSection();
    XdocFile file = (XdocFile) getModel((XtextResource)set.getResource(URI.createURI(ParserTest.TEST_FILE_DIR + "twoChaptersDoc.xdoc"), true));
    Document doc = (Document) file.getMainSection();
    for(int i = 0; i < doc.getChapters().size(); i++) {
      Chapter chapter = doc.getChapters().get(i);
      generate(chapter);
    }
    generate(doc);
View Full Code Here

    assertTrue("Implement", false);
  }

  @Override
  public void testEscape() throws Exception {
    XdocFile file = pTest.getDocFromFile(ParserTest.TEST_FILE_DIR + "testEscape.xdoc");
    generate(file.getMainSection());
    assertGenerated(file.getMainSection());
    validate("testEscape.html", name(file.getMainSection()));
  }
View Full Code Here

    }
  }


  protected Document initDocFromFile(String string, String filename) throws Exception {
    XdocFile file = pTest.getDocFromFile(SRC_DIR + filename);
    AbstractSection mainSection = file.getMainSection();
    if(mainSection instanceof Document) {
      return (Document) mainSection;
    } else if(mainSection instanceof Chapter) {
      Document doc = initDoc(string);
      doc.getChapters().add((Chapter) mainSection);
View Full Code Here

TOP

Related Classes of org.eclipse.xtext.xdoc.xdoc.XdocFile

Copyright © 2018 www.massapicom. 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.