Examples of AbstractSection


Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

      }
    }
    if (!_matched) {
      URI _xblockexpression = null;
      {
        final AbstractSection container = EcoreUtil2.<AbstractSection>getContainerOfType(it, AbstractSection.class);
        final AbstractSection fileSection = this.section2fileSection.get(container);
        URI _targetURI = this.targetURI(fileSection);
        String _localId = this.eclipseNamingExtensions.getLocalId(it);
        URI _appendFragment = _targetURI.appendFragment(_localId);
        URI _targetURI_1 = this.getTargetURI(this.doc);
        _xblockexpression = _appendFragment.deresolve(_targetURI_1);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  public Pair<String, Integer> testGenCode() throws Exception {
    Pair<String, Integer> _xblockexpression = null;
    {
      final XdocFile file = this.getDoc((ParserTestConstants.TEST_FILE_DIR + "codeTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      final Document doc = ((Document) _mainSection);
      this.stateFullGen.generate(doc);
      _xblockexpression = Pair.<String, Integer>of("foo", Integer.valueOf(3));
    }
    return _xblockexpression;
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

  }


  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

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

      _builder.newLine();
      final String text = _builder.toString();
      String _string = text.toString();
      final XdocFile model = this._parseHelperExtensions.parse(_string);
      this._validationTestHelper.assertNoErrors(model);
      AbstractSection _mainSection = model.getMainSection();
      final Chapter chapter = ((Chapter) _mainSection);
      TextOrMarkup _title = chapter.getTitle();
      EList<EObject> _contents = _title.getContents();
      EObject _head = IterableExtensions.<EObject>head(_contents);
      String _text = ((TextPart) _head).getText();
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

      _builder_1.append(ParserTestConstants.CHAPTER_HEAD, "");
      _builder_1.append(anchor, "");
      _builder_1.append(fill, "");
      _builder_1.append(ref, "");
      final XdocFile file = this._parseHelperExtensions.parse(_builder_1);
      AbstractSection _mainSection = file.getMainSection();
      EList<TextOrMarkup> _contents = _mainSection.getContents();
      final TextOrMarkup textOrMarkup = IterableExtensions.<TextOrMarkup>head(_contents);
      EList<EObject> _contents_1 = textOrMarkup.getContents();
      int _size = _contents_1.size();
      Assert.assertEquals(4, _size);
      EList<EObject> _contents_2 = textOrMarkup.getContents();
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  @Test
  public void testCode() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "codeTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      final Document doc = ((Document) _mainSection);
      EList<Chapter> _chapters = doc.getChapters();
      Chapter _head = IterableExtensions.<Chapter>head(_chapters);
      final EList<TextOrMarkup> contents = _head.getContents();
      TextOrMarkup textOrMarkup = IterableExtensions.<TextOrMarkup>head(contents);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

  @Test
  public void testCodeWithLanguage() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile(
        (ParserTestConstants.TEST_FILE_DIR + "codeWithLanguageTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      final Document abstractSection = ((Document) _mainSection);
      EList<Chapter> _chapters = abstractSection.getChapters();
      Chapter _get = _chapters.get(0);
      EList<TextOrMarkup> _contents = _get.getContents();
      final TextOrMarkup textOrMarkup = _contents.get(0);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  @Test
  public void testComment() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "commentTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      EList<TextOrMarkup> _contents = _mainSection.getContents();
      int _size = _contents.size();
      Assert.assertEquals(1, _size);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

  }
 
  @Test
  public void testLink() throws Exception {
    final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "linkTest.xdoc"));
    AbstractSection _mainSection = file.getMainSection();
    EList<TextOrMarkup> _contents = _mainSection.getContents();
    TextOrMarkup _head = IterableExtensions.<TextOrMarkup>head(_contents);
    EList<EObject> _contents_1 = _head.getContents();
    EObject _head_1 = IterableExtensions.<EObject>head(_contents_1);
    final Link link = ((Link) _head_1);
    String _url = link.getUrl();
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

  @Test
  public void testNamedReference() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile(
        (ParserTestConstants.TEST_FILE_DIR + "namedRefAndTextTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      EList<TextOrMarkup> _contents = _mainSection.getContents();
      TextOrMarkup _head = IterableExtensions.<TextOrMarkup>head(_contents);
      EList<EObject> _contents_1 = _head.getContents();
      EObject _head_1 = IterableExtensions.<EObject>head(_contents_1);
      final Ref r = ((Ref) _head_1);
      AbstractSection _mainSection_1 = file.getMainSection();
      Identifiable _ref = r.getRef();
      Assert.assertEquals(_mainSection_1, _ref);
      EList<TextOrMarkup> _contents_2 = r.getContents();
      TextOrMarkup _head_2 = IterableExtensions.<TextOrMarkup>head(_contents_2);
      EList<EObject> _contents_3 = _head_2.getContents();
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.