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;
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, IProblemFactory problemFactory) {
-//CompilerOptions options, IProblemFactory problemFactory) {
+public ProblemHandler(IErrorHandlingPolicy policy, 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
* Error | Warning | Ignore
*/
public int computeSeverity(int problemId){
- if (problemId==IProblem.PHPParsingWarning ||
- problemId==IProblem.PHPVarDeprecatedWarning) {
- return Warning;
- }
return Error; // by default all problems are errors
}
public IProblem createProblem(
/**
* Search the line number corresponding to a specific position
*
- * @param methodBinding org.eclipse.jdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding
+ * @param methodBinding net.sourceforge.phpdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding
*/
public static final int searchLineNumber(int[] startLineIndexes, int position) {
if (startLineIndexes == null)