Package org.eclipse.xtext.xdoc.xdoc

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


   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetMainSection(AbstractSection newMainSection, NotificationChain msgs)
  {
    AbstractSection oldMainSection = mainSection;
    mainSection = newMainSection;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, XdocPackage.XDOC_FILE__MAIN_SECTION, oldMainSection, newMainSection);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here


        if (_notEquals) {
          String _name_1 = identifiable.getName();
          return URI.encodeFragment(_name_1, false);
        }
        EObject _eContainer = identifiable.eContainer();
        final AbstractSection parent = ((AbstractSection) _eContainer);
        boolean _equals = Objects.equal(parent, null);
        if (_equals) {
          return "0";
        } else {
          String _localId = this.getLocalId(parent);
          String _plus = (_localId + "_");
          EList<EObject> _eContents = parent.eContents();
          int _indexOf = _eContents.indexOf(identifiable);
          return (_plus + Integer.valueOf(_indexOf));
        }
      }
    }
View Full Code Here

      EObject tom = code.eContainer();
      while(!(tom.eContainer() instanceof AbstractSection)){
        tom = tom.eContainer();
      }
      if(tom.eContainer() instanceof AbstractSection) {
        AbstractSection section = (AbstractSection) tom.eContainer();
        if(section.getTitle() == tom) {
          error("Headings can not contain code blocks", null);
        }
      }
    }
  }
View Full Code Here

    EList<EObject> _contents = res.getContents();
    EObject _head = IterableExtensions.<EObject>head(_contents);
    if ((_head instanceof XdocFile)) {
      EList<EObject> _contents_1 = res.getContents();
      EObject _head_1 = IterableExtensions.<EObject>head(_contents_1);
      AbstractSection _mainSection = null;
      if (((XdocFile) _head_1)!=null) {
        _mainSection=((XdocFile) _head_1).getMainSection();
      }
      final AbstractSection doc = _mainSection;
      if ((doc instanceof Document)) {
        this.uriUtil.initialize(((Document) doc));
        this.generateDoc(((Document) doc), this.access);
      }
    }
View Full Code Here

    try {
      TreeIterator<EObject> _allContents = resource.getAllContents();
      Iterable<EObject> _iterable = IteratorExtensions.<EObject>toIterable(_allContents);
      Iterable<XdocFile> _filter = Iterables.<XdocFile>filter(_iterable, XdocFile.class);
      for (final XdocFile file : _filter) {
        AbstractSection _mainSection = file.getMainSection();
        if ((_mainSection instanceof Document)) {
          AbstractSection _mainSection_1 = file.getMainSection();
          this.generate(((Document) _mainSection_1), fsa);
        }
      }
    } catch (final Throwable _t) {
      if (_t instanceof Exception) {
View Full Code Here

 
  public URI getTargetURI(final Ref it) {
    URI _xblockexpression = null;
    {
      Identifiable _ref = it.getRef();
      final AbstractSection container = EcoreUtil2.<AbstractSection>getContainerOfType(_ref, AbstractSection.class);
      final AbstractSection fileSection = this.section2fileSection.get(container);
      URI _xifexpression = null;
      boolean _equals = Objects.equal(fileSection, null);
      if (_equals) {
        URI _xblockexpression_1 = null;
        {
View Full Code Here

      }
    }
    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

 
  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

  }


  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

      _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

TOP

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

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.