Package org.eclipse.xtext.xdoc.xdoc

Examples of org.eclipse.xtext.xdoc.xdoc.Identifiable


    {
      EList<TextOrMarkup> _contents = ref.getContents();
      boolean _isEmpty = _contents.isEmpty();
      if (_isEmpty) {
        _builder.append("\\autoref{");
        Identifiable _ref = ref.getRef();
        String _name = _ref.getName();
        _builder.append(_name, "");
        _builder.append("}");
      } else {
        _builder.append("\\hyperref[");
        Identifiable _ref_1 = ref.getRef();
        String _name_1 = _ref_1.getName();
        _builder.append(_name_1, "");
        _builder.append("]{");
        EList<TextOrMarkup> _contents_1 = ref.getContents();
        final Function1<TextOrMarkup, CharSequence> _function = new Function1<TextOrMarkup, CharSequence>() {
          public CharSequence apply(final TextOrMarkup e) {
            return LatexGenerator.this.genNonParContent(e);
          }
        };
        List<CharSequence> _map = ListExtensions.<TextOrMarkup, CharSequence>map(_contents_1, _function);
        String _join = IterableExtensions.join(_map);
        _builder.append(_join, "");
        _builder.append("~(�\\ref*{");
        Identifiable _ref_2 = ref.getRef();
        String _name_2 = _ref_2.getName();
        _builder.append(_name_2, "");
        _builder.append("})}");
      }
    }
    return _builder;
View Full Code Here


            _builder.append(_genPlainText, "");
            _builder.newLineIfNotEmpty();
          }
        }
      } else {
        Identifiable _ref = ref.getRef();
        String _name = _ref.getName();
        _builder.append(_name, "");
        _builder.newLineIfNotEmpty();
      }
    }
    return _builder;
View Full Code Here

   * <!-- end-user-doc -->
   * @generated
   */
  public void setRef(Identifiable newRef)
  {
    Identifiable oldRef = ref;
    ref = newRef;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, XdocPackage.REF__REF, oldRef, ref));
  }
View Full Code Here

 
  protected CharSequence _generate(final Ref ref) {
    CharSequence _xblockexpression = null;
    {
      String _xifexpression = null;
      Identifiable _ref = ref.getRef();
      if ((_ref instanceof AbstractSection)) {
        StringConcatenation _builder = new StringConcatenation();
        _builder.append("title=\"Go to &quot;");
        Identifiable _ref_1 = ref.getRef();
        TextOrMarkup _title = ((AbstractSection) _ref_1).getTitle();
        CharSequence _genPlainText = this.plainText.genPlainText(_title);
        _builder.append(_genPlainText, "");
        _builder.append("&quot;\"");
        _xifexpression = _builder.toString();
      }
      final String title = _xifexpression;
      StringConcatenation _builder_1 = new StringConcatenation();
      {
        EList<TextOrMarkup> _contents = ref.getContents();
        boolean _isEmpty = _contents.isEmpty();
        if (_isEmpty) {
          _builder_1.append("<a href=\"");
          URI _targetURI = this.uriUtil.getTargetURI(ref);
          _builder_1.append(_targetURI, "");
          _builder_1.append("\" ");
          _builder_1.append(title, "");
          _builder_1.append(" >section ");
          Identifiable _ref_2 = ref.getRef();
          String _name = _ref_2.getName();
          _builder_1.append(_name, "");
          _builder_1.append("</a>");
        } else {
          _builder_1.append("<a href=\"");
          URI _targetURI_1 = this.uriUtil.getTargetURI(ref);
View Full Code Here

 
  protected CharSequence _genText(final Ref ref) {
    CharSequence _xblockexpression = null;
    {
      String _xifexpression = null;
      Identifiable _ref = ref.getRef();
      if ((_ref instanceof AbstractSection)) {
        StringConcatenation _builder = new StringConcatenation();
        _builder.append("title=\"Go to &quot;");
        Identifiable _ref_1 = ref.getRef();
        TextOrMarkup _title = ((AbstractSection) _ref_1).getTitle();
        CharSequence _genPlainText = this.plaintext.genPlainText(_title);
        _builder.append(_genPlainText, "");
        _builder.append("&quot;\"");
        _xifexpression = _builder.toString();
      }
      final String title = _xifexpression;
      StringConcatenation _builder_1 = new StringConcatenation();
      {
        EList<TextOrMarkup> _contents = ref.getContents();
        boolean _isEmpty = _contents.isEmpty();
        if (_isEmpty) {
          _builder_1.append("<a href=\"");
          Identifiable _ref_2 = ref.getRef();
          String _fullPHPURL = this.naming.getFullPHPURL(_ref_2);
          _builder_1.append(_fullPHPURL, "");
          _builder_1.append("\" ");
          _builder_1.append(title, "");
          _builder_1.append(" >section ");
          Identifiable _ref_3 = ref.getRef();
          String _name = _ref_3.getName();
          _builder_1.append(_name, "");
          _builder_1.append("</a>");
        } else {
          _builder_1.append("<a href=\"");
          Identifiable _ref_4 = ref.getRef();
          String _fullPHPURL_1 = this.naming.getFullPHPURL(_ref_4);
          _builder_1.append(_fullPHPURL_1, "");
          _builder_1.append("\" ");
          _builder_1.append(title, "");
          _builder_1.append(">");
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;
        {
          Identifiable _ref_1 = it.getRef();
          String _name = _ref_1.getName();
          String _plus = ("error: Cannot resolve reference to " + _name);
          String _plus_1 = (_plus + " from ");
          Identifiable _ref_2 = it.getRef();
          Resource _eResource = _ref_2.eResource();
          URI _uRI = _eResource.getURI();
          String _plus_2 = (_plus_1 + _uRI);
          InputOutput.<String>println(_plus_2);
          _xblockexpression_1 = ((URI) null);
        }
        _xifexpression = _xblockexpression_1;
      } else {
        URI _targetURI = this.targetURI(fileSection);
        Identifiable _ref_1 = it.getRef();
        String _localId = this.eclipseNamingExtensions.getLocalId(_ref_1);
        URI _appendFragment = _targetURI.appendFragment(_localId);
        URI _targetURI_1 = this.getTargetURI(this.doc);
        _xifexpression = _appendFragment.deresolve(_targetURI_1);
      }
View Full Code Here

      Iterable<EObject> _tail = IterableExtensions.<EObject>tail(_contents_2);
      final EObject a = IterableExtensions.<EObject>head(_tail);
      EList<EObject> _contents_3 = textOrMarkup.getContents();
      EObject _get = _contents_3.get(3);
      final Ref r = ((Ref) _get);
      Identifiable _ref = r.getRef();
      Assert.assertEquals(a, _ref);
      EList<TextOrMarkup> _contents_4 = r.getContents();
      TextOrMarkup _head = IterableExtensions.<TextOrMarkup>head(_contents_4);
      EList<EObject> _contents_5 = _head.getContents();
      EObject _head_1 = IterableExtensions.<EObject>head(_contents_5);
View Full Code Here

      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();
      EObject _head_3 = IterableExtensions.<EObject>head(_contents_3);
View Full Code Here

      String _text = ((TextPart) _head).getText();
      Assert.assertEquals("This is ", _text);
      EList<EObject> _contents_2 = textOrMarkup.getContents();
      Iterable<EObject> _tail = IterableExtensions.<EObject>tail(_contents_2);
      EObject _head_1 = IterableExtensions.<EObject>head(_tail);
      Identifiable _ref = ((Ref) _head_1).getRef();
      Assert.assertEquals(section, _ref);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

TOP

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

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.