Package org.eclipse.jdt.core.dom

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


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

      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

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

      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

Related Classes of org.eclipse.jdt.core.dom.LineComment

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.