/** * @param compilationUnit * @param comments */ void buildCommentsTable(CompilationUnit compilationUnit, int[][] comments) { // Build comment table this.commentsTable = new Comment[comments.length]; int nbr = 0; for (int i = 0; i < comments.length; i++) { Comment comment = createComment(comments[i]); if (comment != null) { comment.setAlternateRoot(compilationUnit); this.commentsTable[nbr++] = comment; } } // Resize table if necessary if (nbr<comments.length) { Comment[] newCommentsTable = new Comment[nbr]; System.arraycopy(this.commentsTable, 0, newCommentsTable, 0, nbr); this.commentsTable = newCommentsTable; } compilationUnit.setCommentTable(this.commentsTable); }
/** * @param compilationUnit * @param comments */ void buildCommentsTable(CompilationUnit compilationUnit, int[][] comments) { // Build comment table this.commentsTable = new Comment[comments.length]; int nbr = 0; for (int i = 0; i < comments.length; i++) { Comment comment = createComment(comments[i]); if (comment != null) { comment.setAlternateRoot(compilationUnit); this.commentsTable[nbr++] = comment; } } // Resize table if necessary if (nbr<comments.length) { Comment[] newCommentsTable = new Comment[nbr]; System.arraycopy(this.commentsTable, 0, newCommentsTable, 0, nbr); this.commentsTable = newCommentsTable; } compilationUnit.setCommentTable(this.commentsTable); }
/** * @param compilationUnit * @param comments */ void buildCommentsTable(CompilationUnit compilationUnit, int[][] comments) { // Build comment table this.commentsTable = new Comment[comments.length]; int nbr = 0; for (int i = 0; i < comments.length; i++) { Comment comment = createComment(comments[i]); if (comment != null) { comment.setAlternateRoot(compilationUnit); this.commentsTable[nbr++] = comment; } } // Resize table if necessary if (nbr<comments.length) { Comment[] newCommentsTable = new Comment[nbr]; System.arraycopy(this.commentsTable, 0, newCommentsTable, 0, nbr); this.commentsTable = newCommentsTable; } compilationUnit.setCommentTable(this.commentsTable); }
/** * @param compilationUnit * @param comments */ void buildCommentsTable(CompilationUnit compilationUnit, int[][] comments) { // Build comment table this.commentsTable = new Comment[comments.length]; int nbr = 0; for (int i = 0; i < comments.length; i++) { Comment comment = createComment(comments[i]); if (comment != null) { comment.setAlternateRoot(compilationUnit); this.commentsTable[nbr++] = comment; } } // Resize table if necessary if (nbr<comments.length) { Comment[] newCommentsTable = new Comment[nbr]; System.arraycopy(this.commentsTable, 0, newCommentsTable, 0, nbr); this.commentsTable = newCommentsTable; } compilationUnit.setCommentTable(this.commentsTable); }
/** * @param compilationUnit * @param comments */ void buildCommentsTable(CompilationUnit compilationUnit, int[][] comments) { // Build comment table this.commentsTable = new Comment[comments.length]; int nbr = 0; for (int i = 0; i < comments.length; i++) { Comment comment = createComment(comments[i]); if (comment != null) { comment.setAlternateRoot(compilationUnit); this.commentsTable[nbr++] = comment; } } // Resize table if necessary if (nbr<comments.length) { Comment[] newCommentsTable = new Comment[nbr]; System.arraycopy(this.commentsTable, 0, newCommentsTable, 0, nbr); this.commentsTable = newCommentsTable; } compilationUnit.setCommentTable(this.commentsTable); }
/** * @param compilationUnit * @param comments */ void buildCommentsTable(CompilationUnit compilationUnit, int[][] comments) { // Build comment table this.commentsTable = new Comment[comments.length]; int nbr = 0; for (int i = 0; i < comments.length; i++) { Comment comment = createComment(comments[i]); if (comment != null) { comment.setAlternateRoot(compilationUnit); this.commentsTable[nbr++] = comment; } } // Resize table if necessary if (nbr<comments.length) { Comment[] newCommentsTable = new Comment[nbr]; System.arraycopy(this.commentsTable, 0, newCommentsTable, 0, nbr); this.commentsTable = newCommentsTable; } compilationUnit.setCommentTable(this.commentsTable); }