Examples of LineComment


Examples of com.github.antlrjavaparser.api.LineComment

    private static Comment adaptComment(
            final org.springframework.roo.classpath.details.comments.AbstractComment rooComment) {
        Comment comment;

        if (rooComment instanceof org.springframework.roo.classpath.details.comments.LineComment) {
            comment = new LineComment();
        }
        else if (rooComment instanceof org.springframework.roo.classpath.details.comments.JavadocComment) {
            comment = new JavadocComment();
        }
        else {
View Full Code Here

Examples of japa.parser.ast.LineComment

        return Boolean.TRUE;
    }

    public Boolean visit(LineComment n1, Node arg) {
        LineComment n2 = (LineComment) arg;

        if (!objEquals(n1.getContent(), n2.getContent())) {
            return Boolean.FALSE;
        }

        return Boolean.TRUE;
    }
View Full Code Here

Examples of japa.parser.ast.comments.LineComment

    return r;
  }

  @Override
  public Node visit(LineComment _n, Object _arg) {
    return new LineComment(_n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), _n.getContent());
  }
View Full Code Here

Examples of japa.parser.ast.comments.LineComment

    return Boolean.TRUE;
  }

  @Override public Boolean visit(final LineComment n1, final Node arg) {
    final LineComment n2 = (LineComment) arg;

    if (!objEquals(n1.getContent(), n2.getContent())) {
      return Boolean.FALSE;
    }

        if (!objEquals(n1.getBeginLine(), n2.getBeginLine())) {
          return Boolean.FALSE;
        }

    return Boolean.TRUE;
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.dom.LineComment

        // fill the offset table
        this.offsets= new int[count];
        for (int i= 0, k= 0; i < nComments; i++) {
          Object curr= this.commentList.get(i);
          if (curr instanceof LineComment) {
            LineComment comment= (LineComment) curr;
            this.offsets[k++]= comment.getStartPosition() + comment.getLength();
          }
        }
      } else {
        this.offsets= Util.EMPTY_INT_ARRAY;
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.LineComment

        Comment c = (Comment) it.next();
        // $ANALYSIS-IGNORE,codereview.java.rules.loop.RuleLoopAssignLoopVariable
        line = resource.getResourceCompUnit().getLineNumber(
            c.getStartPosition());
        if (c.getNodeType() == ASTNode.LINE_COMMENT) {
          LineComment lc = (LineComment) c;

          try {
            String comment = resource.getICompilationUnit()
                .getBuffer().getText(lc.getStartPosition(),
                    lc.getLength());
            int index = comment
                .indexOf(AnalysisConstants.IGNORE_TAG
                    + AnalysisConstants.LIST_DELIMITER);
            if (index == -1) {
              index = comment
View Full Code Here

Examples of org.eclipse.jdt.core.dom.LineComment

        // fill the offset table
        this.offsets= new int[count];
        for (int i= 0, k= 0; i < nComments; i++) {
          Object curr= this.commentList.get(i);
          if (curr instanceof LineComment) {
            LineComment comment= (LineComment) curr;
            this.offsets[k++]= comment.getStartPosition() + comment.getLength();
          }
        }
      } else {
        this.offsets= Util.EMPTY_INT_ARRAY;
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.LineComment

      if (i > 0) {
        // record comments between the previous comment and the current one that are not part
        // of any comment extended range.
        if ((nextOffsetLine - currEndLine) > 1) {
          // check for comments between the two imports
          LineComment comment = root.getAST().newLineComment();
          comment.setSourceRange(currentExtendedEnd + 1, 0);
          int index = Collections.binarySearch(commentList, comment, new Comparator() {
            public int compare(Object o1, Object o2) {
              return ((Comment) o1).getStartPosition() - ((Comment) o2).getStartPosition();
            }
          });
View Full Code Here

Examples of org.eclipse.jdt.core.dom.LineComment

        // fill the offset table
        this.offsets= new int[count];
        for (int i= 0, k= 0; i < nComments; i++) {
          Object curr= this.commentList.get(i);
          if (curr instanceof LineComment) {
            LineComment comment= (LineComment) curr;
            this.offsets[k++]= comment.getStartPosition() + comment.getLength();
          }
        }
      } else {
        this.offsets= Util.EMPTY_INT_ARRAY;
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.LineComment

      if (i > 0) {
        // record comments between the previous comment and the current one that are not part
        // of any comment extended range.
        if ((nextOffsetLine - currEndLine) > 1) {
          // check for comments between the two imports
          LineComment comment = root.getAST().newLineComment();
          comment.setSourceRange(currentExtendedEnd + 1, 0);
          int index = Collections.binarySearch(commentList, comment, new Comparator() {
            public int compare(Object o1, Object o2) {
              return ((Comment) o1).getStartPosition() - ((Comment) o2).getStartPosition();
            }
          });
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.