Examples of MSourcePosition


Examples of org.codehaus.jam.mutable.MSourcePosition

    SourcePosition pos = src.position();
    if (pos != null) addSourcePosition(dest,pos);
  }

  public static void addSourcePosition(MElement dest, SourcePosition pos) {
    MSourcePosition sp = dest.createSourcePosition();
    sp.setColumn(pos.column());
    sp.setLine(pos.line());
    File f = pos.file();
    if (f != null) sp.setSourceURI(f.toURI());
  }
View Full Code Here

Examples of org.codehaus.jam.mutable.MSourcePosition

  private void setPosition(MAnnotation target, Tag tag) {
    //add source position info, if available
    SourcePosition pos = tag.position();
    if (pos != null) {
      MSourcePosition mpos = target.createSourcePosition();
      mpos.setLine(pos.line());
      mpos.setColumn(pos.column());
      if (pos.file() != null) mpos.setSourceURI(pos.file().toURI());
    }
  }
View Full Code Here

Examples of org.codehaus.jam.mutable.MSourcePosition

  private void readSourcePosition(MAnnotatedElement element)
    throws XMLStreamException
  {
    assertStart(SOURCEPOSITION);
    MSourcePosition pos = element.createSourcePosition();
    nextElement();
    if (LINE.equals(getElementName())) {
      pos.setLine(assertCurrentInt(LINE));
    }
    if (COLUMN.equals(getElementName())) {
      pos.setColumn(assertCurrentInt(COLUMN));
    }
    if (SOURCEURI.equals(getElementName())) {
      try {
        pos.setSourceURI(new URI(assertCurrentString(SOURCEURI)));
      } catch(URISyntaxException use) {
        throw new XMLStreamException(use);
      }
    }
    assertEnd(SOURCEPOSITION);
View Full Code Here

Examples of org.codehaus.jam.mutable.MSourcePosition

  private void setPosition(MAnnotation target, Tag tag) {
    //add source position info, if available
    SourcePosition pos = tag.position();
    if (pos != null) {
      MSourcePosition mpos = target.createSourcePosition();
      mpos.setLine(pos.line());
      mpos.setColumn(pos.column());
      if (pos.file() != null) mpos.setSourceURI(pos.file().toURI());
    }
  }
View Full Code Here

Examples of org.codehaus.jam.mutable.MSourcePosition

    SourcePosition pos = src.position();
    if (pos != null) addSourcePosition(dest,pos);
  }

  public static void addSourcePosition(MElement dest, SourcePosition pos) {
    MSourcePosition sp = dest.createSourcePosition();
    sp.setColumn(pos.column());
    sp.setLine(pos.line());
    File f = pos.file();
    if (f != null) sp.setSourceURI(f.toURI());
  }
View Full Code Here

Examples of org.codehaus.jam.mutable.MSourcePosition

  private void readSourcePosition(MAnnotatedElement element)
    throws XMLStreamException
  {
    assertStart(SOURCEPOSITION);
    MSourcePosition pos = element.createSourcePosition();
    nextElement();
    if (LINE.equals(getElementName())) {
      pos.setLine(assertCurrentInt(LINE));
    }
    if (COLUMN.equals(getElementName())) {
      pos.setColumn(assertCurrentInt(COLUMN));
    }
    if (SOURCEURI.equals(getElementName())) {
      try {
        pos.setSourceURI(new URI(assertCurrentString(SOURCEURI)));
      } catch(URISyntaxException use) {
        throw new XMLStreamException(use);
      }
    }
    assertEnd(SOURCEPOSITION);
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.