X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/problem/ProblemHandler.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/problem/ProblemHandler.java index 9295af1..e96bead 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/problem/ProblemHandler.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/problem/ProblemHandler.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others. + * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v0.5 + * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v05.html + * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation - ******************************************************************************/ + *******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.problem; import net.sourceforge.phpdt.core.compiler.IProblem; import net.sourceforge.phpdt.internal.compiler.CompilationResult; import net.sourceforge.phpdt.internal.compiler.IErrorHandlingPolicy; import net.sourceforge.phpdt.internal.compiler.IProblemFactory; -import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions; import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; + /* * Compiler error handler, responsible to determine whether * a problem is actually a warning or an error; also will @@ -28,19 +28,22 @@ import net.sourceforge.phpdt.internal.compiler.impl.ReferenceContext; public class ProblemHandler implements ProblemSeverities { + public final static String[] NoArgument = new String[0]; + final public IErrorHandlingPolicy policy; public final IProblemFactory problemFactory; - public final CompilerOptions options; +// public final CompilerOptions options; /* * Problem handler can be supplied with a policy to specify * its behavior in error handling. Also see static methods for * built-in policies. * */ -public ProblemHandler(IErrorHandlingPolicy policy, CompilerOptions options, IProblemFactory problemFactory) { +public ProblemHandler(IErrorHandlingPolicy policy, IProblemFactory problemFactory) { +//CompilerOptions options, IProblemFactory problemFactory) { this.policy = policy; this.problemFactory = problemFactory; - this.options = options; +// this.options = options; } /* * Given the current configuration, answers which category the problem @@ -55,6 +58,7 @@ public IProblem createProblem( char[] fileName, int problemId, String[] problemArguments, + String[] messageArguments, int severity, int problemStartPosition, int problemEndPosition, @@ -66,6 +70,7 @@ public IProblem createProblem( fileName, problemId, problemArguments, + messageArguments, severity, problemStartPosition, problemEndPosition, @@ -74,6 +79,7 @@ public IProblem createProblem( public void handle( int problemId, String[] problemArguments, + String[] messageArguments, int severity, int problemStartPosition, int problemEndPosition, @@ -86,7 +92,7 @@ public void handle( // if no reference context, we need to abort from the current compilation process if (referenceContext == null) { if ((severity & Error) != 0) { // non reportable error is fatal - throw new AbortCompilation(problemId, problemArguments); + throw new AbortCompilation(problemId, problemArguments, messageArguments); } else { return; // ignore non reportable warning } @@ -97,6 +103,7 @@ public void handle( unitResult.getFileName(), problemId, problemArguments, + messageArguments, severity, problemStartPosition, problemEndPosition, @@ -132,6 +139,7 @@ public void handle( public void handle( int problemId, String[] problemArguments, + String[] messageArguments, int problemStartPosition, int problemEndPosition, ReferenceContext referenceContext, @@ -140,6 +148,7 @@ public void handle( this.handle( problemId, problemArguments, + messageArguments, this.computeSeverity(problemId), // severity inferred using the ID problemStartPosition, problemEndPosition,