Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-02-21 10:20:04 +0000
committerMarkus Schorn2008-02-21 10:20:04 +0000
commitf211b6d5124b7a3df51a975fe804a36d3f50fa7a (patch)
tree5dea1d7a489d719aa549c0da2ac35e8a0fcad88b /core/org.eclipse.cdt.core/model/org
parentf7b257a9a219c44741802251a920fda33c48ec69 (diff)
downloadorg.eclipse.cdt-f211b6d5124b7a3df51a975fe804a36d3f50fa7a.tar.gz
org.eclipse.cdt-f211b6d5124b7a3df51a975fe804a36d3f50fa7a.tar.xz
org.eclipse.cdt-f211b6d5124b7a3df51a975fe804a36d3f50fa7a.zip
Removed class Problem, a duplicate of ASTProblem, related to bug 212864.
Diffstat (limited to 'core/org.eclipse.cdt.core/model/org')
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java103
1 files changed, 2 insertions, 101 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
index 785b99d4b22..4999f370e20 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
@@ -75,7 +75,6 @@ import org.eclipse.cdt.core.model.IContributedModelBuilder;
import org.eclipse.cdt.core.model.IProblemRequestor;
import org.eclipse.cdt.core.model.IStructure;
import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.core.parser.IProblem;
import org.eclipse.cdt.core.parser.Keywords;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousDeclaration;
@@ -91,104 +90,6 @@ import org.eclipse.core.runtime.OperationCanceledException;
*/
public class CModelBuilder2 implements IContributedModelBuilder {
- /**
- * Adapts {@link IASTProblem} to {@link IProblem).
- */
- private static class ProblemAdapter implements IProblem {
-
- private IASTProblem fASTProblem;
-
- /**
- * @param problem
- */
- public ProblemAdapter(IASTProblem problem) {
- fASTProblem= problem;
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#checkCategory(int)
- */
- public boolean checkCategory(int bitmask) {
- return fASTProblem.checkCategory(bitmask);
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#getArguments()
- */
- public String[] getArguments() {
- return new String[] { fASTProblem.getArguments() };
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#getID()
- */
- public int getID() {
- return fASTProblem.getID();
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#getMessage()
- */
- public String getMessage() {
- return fASTProblem.getMessageWithoutLocation();
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#getOriginatingFileName()
- */
- public char[] getOriginatingFileName() {
- return fASTProblem.getContainingFilename().toCharArray();
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#getSourceEnd()
- */
- public int getSourceEnd() {
- IASTFileLocation location= fASTProblem.getFileLocation();
- if (location != null) {
- return location.getNodeOffset() + location.getNodeLength() - 1;
- }
- return -1;
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#getSourceLineNumber()
- */
- public int getSourceLineNumber() {
- IASTFileLocation location= fASTProblem.getFileLocation();
- if (location != null) {
- return location.getStartingLineNumber();
- }
- return -1;
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#getSourceStart()
- */
- public int getSourceStart() {
- IASTFileLocation location= fASTProblem.getFileLocation();
- if (location != null) {
- return location.getNodeOffset();
- }
- return -1;
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#isError()
- */
- public boolean isError() {
- return fASTProblem.isError();
- }
-
- /*
- * @see org.eclipse.cdt.core.parser.IProblem#isWarning()
- */
- public boolean isWarning() {
- return fASTProblem.isWarning();
- }
-
- }
-
private final TranslationUnit fTranslationUnit;
private String fTranslationUnitFileName;
private ASTAccessVisibility fCurrentVisibility;
@@ -340,14 +241,14 @@ public class CModelBuilder2 implements IContributedModelBuilder {
for (int i= 0; i < problems.length; i++) {
IASTProblem problem= problems[i];
if (isLocalToFile(problem)) {
- problemRequestor.acceptProblem(new ProblemAdapter(problem));
+ problemRequestor.acceptProblem(problem);
}
}
problems= CPPVisitor.getProblems(ast);
for (int i= 0; i < problems.length; i++) {
IASTProblem problem= problems[i];
if (isLocalToFile(problem)) {
- problemRequestor.acceptProblem(new ProblemAdapter(problem));
+ problemRequestor.acceptProblem(problem);
}
}
problemRequestor.endReporting();

Back to the top