1 /*******************************************************************************
2 * Copyright (c) 2002, 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core.util;
13 import net.sourceforge.phpdt.core.compiler.CategorizedProblem;
14 import net.sourceforge.phpdt.internal.compiler.CompilationResult;
17 * Use to keep track of recorded information during the parsing like comment positions,
18 * line ends or problems.
20 public class RecordedParsingInformation {
21 public CategorizedProblem[] problems;
22 public int problemsCount;
23 public int[] lineEnds;
24 public int[][] commentPositions;
26 public RecordedParsingInformation(CategorizedProblem[] problems, int[] lineEnds, int[][] commentPositions) {
27 this.problems = problems;
28 this.lineEnds = lineEnds;
29 this.commentPositions = commentPositions;
30 this.problemsCount = problems != null ? problems.length : 0;
33 void updateRecordedParsingInformation(CompilationResult compilationResult) {
34 if (compilationResult.problems != null) {
35 this.problems = compilationResult.problems;
36 this.problemsCount = this.problems.length;