Syntax highlighting is changeable.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / problem / ProblemReporter.java
index 23f61e3..29ba040 100644 (file)
@@ -24,7 +24,6 @@ import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding;
 import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding;
 import net.sourceforge.phpdt.internal.compiler.lookup.ProblemMethodBinding;
 import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReasons;
-import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReferenceBinding;
 import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding;
 import net.sourceforge.phpdt.internal.compiler.lookup.SourceTypeBinding;
 import net.sourceforge.phpdt.internal.compiler.lookup.SyntheticArgumentBinding;
@@ -40,7 +39,7 @@ import net.sourceforge.phpeclipse.internal.compiler.ast.Argument;
 import net.sourceforge.phpeclipse.internal.compiler.ast.ArrayAllocationExpression;
 import net.sourceforge.phpeclipse.internal.compiler.ast.ArrayReference;
 import net.sourceforge.phpeclipse.internal.compiler.ast.Assignment;
-import net.sourceforge.phpeclipse.internal.compiler.ast.AstNode;
+import net.sourceforge.phpeclipse.internal.compiler.ast.ASTNode;
 import net.sourceforge.phpeclipse.internal.compiler.ast.BinaryExpression;
 import net.sourceforge.phpeclipse.internal.compiler.ast.BranchStatement;
 import net.sourceforge.phpeclipse.internal.compiler.ast.Case;
@@ -54,7 +53,6 @@ import net.sourceforge.phpeclipse.internal.compiler.ast.ExplicitConstructorCall;
 import net.sourceforge.phpeclipse.internal.compiler.ast.Expression;
 import net.sourceforge.phpeclipse.internal.compiler.ast.FieldDeclaration;
 import net.sourceforge.phpeclipse.internal.compiler.ast.FieldReference;
-import net.sourceforge.phpeclipse.internal.compiler.ast.ImportReference;
 import net.sourceforge.phpeclipse.internal.compiler.ast.InstanceOfExpression;
 import net.sourceforge.phpeclipse.internal.compiler.ast.IntLiteral;
 import net.sourceforge.phpeclipse.internal.compiler.ast.Literal;
@@ -89,7 +87,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
     this.handle(IProblem.Unclassified, arguments, arguments, Error | Abort, 0,
         0);
   }
-  public void abortDueToInternalError(String errorMessage, AstNode location) {
+  public void abortDueToInternalError(String errorMessage, ASTNode location) {
     String[] arguments = new String[]{errorMessage};
     this.handle(IProblem.Unclassified, arguments, arguments, Error | Abort,
         location.sourceStart, location.sourceEnd);
@@ -137,7 +135,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         method.sourceStart, method.sourceEnd, method, method
             .compilationResult());
   }
-  public void alreadyDefinedLabel(char[] labelName, AstNode location) {
+  public void alreadyDefinedLabel(char[] labelName, ASTNode location) {
     String[] arguments = new String[]{new String(labelName)};
     this.handle(IProblem.DuplicateLabel, arguments, arguments,
         location.sourceStart, location.sourceEnd);
@@ -253,7 +251,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
     this.handle(IProblem.CannotAllocateVoidArray, NoArgument, NoArgument,
         expression.sourceStart, expression.sourceEnd);
   }
-  public void cannotAssignToFinalField(FieldBinding field, AstNode location) {
+  public void cannotAssignToFinalField(FieldBinding field, ASTNode location) {
     this.handle(IProblem.FinalFieldAssignment, new String[]{
         (field.declaringClass == null ? "array" : new String(
             field.declaringClass.readableName())), //$NON-NLS-1$
@@ -264,13 +262,13 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         location.sourceEnd);
   }
   public void cannotAssignToFinalLocal(LocalVariableBinding local,
-      AstNode location) {
+      ASTNode location) {
     String[] arguments = new String[]{new String(local.readableName())};
     this.handle(IProblem.NonBlankFinalLocalAssignment, arguments, arguments,
         location.sourceStart, location.sourceEnd);
   }
   public void cannotAssignToFinalOuterLocal(LocalVariableBinding local,
-      AstNode location) {
+      ASTNode location) {
     String[] arguments = new String[]{new String(local.readableName())};
     this.handle(IProblem.FinalOuterLocalAssignment, arguments, arguments,
         location.sourceStart, location.sourceEnd);
@@ -295,11 +293,11 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         new String(method.selector), parametersAsShortString(method)},
         messageSend.sourceStart, messageSend.sourceEnd);
   }
-  public void cannotImportPackage(ImportReference importRef) {
-    String[] arguments = new String[]{CharOperation.toString(importRef.tokens)};
-    this.handle(IProblem.CannotImportPackage, arguments, arguments,
-        importRef.sourceStart, importRef.sourceEnd);
-  }
+//  public void cannotImportPackage(ImportReference importRef) {
+//    String[] arguments = new String[]{CharOperation.toString(importRef.tokens)};
+//    this.handle(IProblem.CannotImportPackage, arguments, arguments,
+//        importRef.sourceStart, importRef.sourceEnd);
+//  }
   public void cannotInstantiate(TypeReference typeRef, TypeBinding type) {
     this.handle(IProblem.InvalidClassInstantiation, new String[]{new String(
         type.readableName())},
@@ -307,12 +305,12 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         typeRef.sourceStart, typeRef.sourceEnd);
   }
   public void cannotReferToNonFinalOuterLocal(LocalVariableBinding local,
-      AstNode location) {
+      ASTNode location) {
     String[] arguments = new String[]{new String(local.readableName())};
     this.handle(IProblem.OuterLocalMustBeFinal, arguments, arguments,
         location.sourceStart, location.sourceEnd);
   }
-  public void cannotReturnInInitializer(AstNode location) {
+  public void cannotReturnInInitializer(ASTNode location) {
     this.handle(IProblem.CannotReturnInInitializer, NoArgument, NoArgument,
         location.sourceStart, location.sourceEnd);
   }
@@ -328,7 +326,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         .shortReadableName())}, exceptionType.sourceStart,
         exceptionType.sourceEnd);
   }
-  public void cannotUseSuperInJavaLangObject(AstNode reference) {
+  public void cannotUseSuperInJavaLangObject(ASTNode reference) {
     this.handle(IProblem.ObjectHasNoSuperclass, NoArgument, NoArgument,
         reference.sourceStart, reference.sourceEnd);
   }
@@ -376,6 +374,12 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
 
        // if not then check whether it is a configurable problem
        switch(problemId){
+           case IProblem.PHPVarDeprecatedWarning :
+                 return this.options.getSeverity(CompilerOptions.PHPVarDeprecatedWarning);
+           case IProblem.PHPBadStyleKeywordWarning :
+                 return this.options.getSeverity(CompilerOptions.PHPBadStyleKeywordWarning);
+           case IProblem.PHPBadStyleUppercaseIdentifierWarning :
+             return this.options.getSeverity(CompilerOptions.PHPBadStyleUppercaseIdentifierWarning);
 
                case IProblem.MaskedCatch : 
                        return this.options.getSeverity(CompilerOptions.MaskedCatchBlock);
@@ -554,11 +558,11 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
   //           expression.sourceStart,
   //           expression.sourceEnd);
   //}
-  public void conflictingImport(ImportReference importRef) {
-    String[] arguments = new String[]{CharOperation.toString(importRef.tokens)};
-    this.handle(IProblem.ConflictingImport, arguments, arguments,
-        importRef.sourceStart, importRef.sourceEnd);
-  }
+//  public void conflictingImport(ImportReference importRef) {
+//    String[] arguments = new String[]{CharOperation.toString(importRef.tokens)};
+//    this.handle(IProblem.ConflictingImport, arguments, arguments,
+//        importRef.sourceStart, importRef.sourceEnd);
+//  }
   public void constantOutOfFormat(NumberLiteral lit) {
     // the literal is not in a correct format
     // this code is called on IntLiteral and LongLiteral
@@ -603,14 +607,14 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
     this.handle(IProblem.NumericValueOutOfRange, arguments, arguments,
         lit.sourceStart, lit.sourceEnd);
   }
-  public void deprecatedField(FieldBinding field, AstNode location) {
+  public void deprecatedField(FieldBinding field, ASTNode location) {
     this.handle(IProblem.UsingDeprecatedField,
         new String[]{new String(field.declaringClass.readableName()),
             new String(field.name)}, new String[]{
             new String(field.declaringClass.shortReadableName()),
             new String(field.name)}, location.sourceStart, location.sourceEnd);
   }
-  public void deprecatedMethod(MethodBinding method, AstNode location) {
+  public void deprecatedMethod(MethodBinding method, ASTNode location) {
     if (method.isConstructor())
       this.handle(IProblem.UsingDeprecatedConstructor, new String[]{
           new String(method.declaringClass.readableName()),
@@ -626,7 +630,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
               new String(method.selector), parametersAsShortString(method)},
           location.sourceStart, location.sourceEnd);
   }
-  public void deprecatedType(TypeBinding type, AstNode location) {
+  public void deprecatedType(TypeBinding type, ASTNode location) {
     if (location == null)
       return; // 1G828DN - no type ref for synthetic arguments
     this.handle(IProblem.UsingDeprecatedType, new String[]{new String(type
@@ -649,11 +653,11 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         new String(type.shortReadableName()), fieldDecl.name()},
         fieldDecl.sourceStart, fieldDecl.sourceEnd);
   }
-  public void duplicateImport(ImportReference importRef) {
-    String[] arguments = new String[]{CharOperation.toString(importRef.tokens)};
-    this.handle(IProblem.DuplicateImport, arguments, arguments,
-        importRef.sourceStart, importRef.sourceEnd);
-  }
+//  public void duplicateImport(ImportReference importRef) {
+//    String[] arguments = new String[]{CharOperation.toString(importRef.tokens)};
+//    this.handle(IProblem.DuplicateImport, arguments, arguments,
+//        importRef.sourceStart, importRef.sourceEnd);
+//  }
   public void duplicateInitializationOfBlankFinalField(FieldBinding field,
       Reference reference) {
     String[] arguments = new String[]{new String(field.readableName())};
@@ -661,7 +665,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         arguments, reference.sourceStart, reference.sourceEnd);
   }
   public void duplicateInitializationOfFinalLocal(LocalVariableBinding local,
-      AstNode location) {
+      ASTNode location) {
     String[] arguments = new String[]{new String(local.readableName())};
     this.handle(IProblem.DuplicateFinalLocalInitialization, arguments,
         arguments, location.sourceStart, location.sourceEnd);
@@ -750,7 +754,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         new String(messageSend.selector), shortBuffer.toString()},
         messageSend.sourceStart, messageSend.sourceEnd);
   }
-  public void errorThisSuperInStatic(AstNode reference) {
+  public void errorThisSuperInStatic(ASTNode reference) {
     String[] arguments = new String[]{reference.isSuper() ? "super" : "this"}; //$NON-NLS-2$ //$NON-NLS-1$
     this.handle(IProblem.ThisInStaticContext, arguments, arguments,
         reference.sourceStart, reference.sourceEnd);
@@ -1010,7 +1014,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         localDecl.sourceStart, localDecl.sourceEnd);
   }
   public void illegalPrimitiveOrArrayTypeForEnclosingInstance(
-      TypeBinding enclosingType, AstNode location) {
+      TypeBinding enclosingType, ASTNode location) {
     this.handle(IProblem.IllegalPrimitiveOrArrayTypeForEnclosingInstance,
         new String[]{new String(enclosingType.readableName())},
         new String[]{new String(enclosingType.shortReadableName())},
@@ -1046,52 +1050,52 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
     this.handle(IProblem.IllegalVisibilityModifierForInterfaceMemberType,
         arguments, arguments, type.sourceStart(), type.sourceEnd());
   }
-  public void illegalVoidExpression(AstNode location) {
+  public void illegalVoidExpression(ASTNode location) {
     this.handle(IProblem.InvalidVoidExpression, NoArgument, NoArgument,
         location.sourceStart, location.sourceEnd);
   }
-  public void importProblem(ImportReference importRef, Binding expectedImport) {
-    int problemId = expectedImport.problemId();
-    int id;
-    switch (problemId) {
-      case NotFound :
-        // 1
-        id = IProblem.ImportNotFound;
-        break;
-      case NotVisible :
-        // 2
-        id = IProblem.ImportNotVisible;
-        break;
-      case Ambiguous :
-        // 3
-        id = IProblem.ImportAmbiguous;
-        break;
-      case InternalNameProvided :
-        // 4
-        id = IProblem.ImportInternalNameProvided;
-        break;
-      case InheritedNameHidesEnclosingName :
-        // 5
-        id = IProblem.ImportInheritedNameHidesEnclosingName;
-        break;
-      case NoError :
-      // 0
-      default :
-        needImplementation(); // want to fail to see why we were
-        // here...
-        return;
-    }
-    String argument;
-    if (expectedImport instanceof ProblemReferenceBinding) {
-      argument = CharOperation
-          .toString(((ProblemReferenceBinding) expectedImport).compoundName);
-    } else {
-      argument = CharOperation.toString(importRef.tokens);
-    }
-    String[] arguments = new String[]{argument};
-    this.handle(id, arguments, arguments, importRef.sourceStart,
-        importRef.sourceEnd);
-  }
+//  public void importProblem(ImportReference importRef, Binding expectedImport) {
+//    int problemId = expectedImport.problemId();
+//    int id;
+//    switch (problemId) {
+//      case NotFound :
+//        // 1
+//        id = IProblem.ImportNotFound;
+//        break;
+//      case NotVisible :
+//        // 2
+//        id = IProblem.ImportNotVisible;
+//        break;
+//      case Ambiguous :
+//        // 3
+//        id = IProblem.ImportAmbiguous;
+//        break;
+//      case InternalNameProvided :
+//        // 4
+//        id = IProblem.ImportInternalNameProvided;
+//        break;
+//      case InheritedNameHidesEnclosingName :
+//        // 5
+//        id = IProblem.ImportInheritedNameHidesEnclosingName;
+//        break;
+//      case NoError :
+//      // 0
+//      default :
+//        needImplementation(); // want to fail to see why we were
+//        // here...
+//        return;
+//    }
+//    String argument;
+//    if (expectedImport instanceof ProblemReferenceBinding) {
+//      argument = CharOperation
+//          .toString(((ProblemReferenceBinding) expectedImport).compoundName);
+//    } else {
+//      argument = CharOperation.toString(importRef.tokens);
+//    }
+//    String[] arguments = new String[]{argument};
+//    this.handle(id, arguments, arguments, importRef.sourceStart,
+//        importRef.sourceEnd);
+//  }
   public void incompatibleExceptionInThrowsClause(SourceTypeBinding type,
       MethodBinding currentMethod, MethodBinding inheritedMethod,
       ReferenceBinding exceptionType) {
@@ -1219,7 +1223,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         NoArgument, fieldDecl.sourceStart, fieldDecl.sourceEnd);
   }
   public void innerTypesCannotDeclareStaticInitializers(
-      ReferenceBinding innerType, AstNode location) {
+      ReferenceBinding innerType, ASTNode location) {
     this.handle(IProblem.CannotDefineStaticInitializerInLocalType,
         new String[]{new String(innerType.readableName())},
         new String[]{new String(innerType.shortReadableName())},
@@ -1236,7 +1240,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
     this.handle(IProblem.InterfaceCannotHaveInitializers, arguments, arguments,
         fieldDecl.sourceStart, fieldDecl.sourceEnd);
   }
-  public void invalidBreak(AstNode location) {
+  public void invalidBreak(ASTNode location) {
     this.handle(IProblem.InvalidBreak, NoArgument, NoArgument,
         location.sourceStart, location.sourceEnd);
   }
@@ -1289,7 +1293,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         parametersAsShortString(targetConstructor)}, statement.sourceStart,
         statement.sourceEnd);
   }
-  public void invalidContinue(AstNode location) {
+  public void invalidContinue(ASTNode location) {
     this.handle(IProblem.InvalidContinue, NoArgument, NoArgument,
         location.sourceStart, location.sourceEnd);
   }
@@ -1597,7 +1601,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
             new String(type.shortReadableName())}, expression.sourceStart,
         expression.sourceEnd);
   }
-  public void invalidParenthesizedExpression(AstNode reference) {
+  public void invalidParenthesizedExpression(ASTNode reference) {
     this.handle(IProblem.InvalidParenthesizedExpression, NoArgument,
         NoArgument, reference.sourceStart, reference.sourceEnd);
   }
@@ -1677,7 +1681,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         new String(type.sourceName())}, superinterfaceRef.sourceStart,
         superinterfaceRef.sourceEnd);
   }
-  public void invalidType(AstNode location, TypeBinding type) {
+  public void invalidType(ASTNode location, TypeBinding type) {
     int flag = IProblem.UndefinedType; // default
     switch (type.problemId()) {
       case NotFound :
@@ -1732,7 +1736,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
             : compUnitDecl.sourceEnd);
   }
   public void maskedExceptionHandler(ReferenceBinding exceptionType,
-      AstNode location) {
+      ASTNode location) {
     this.handle(IProblem.MaskedCatch, NoArgument, NoArgument,
         location.sourceStart, location.sourceEnd);
   }
@@ -1752,7 +1756,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         methodDecl.sourceStart, methodDecl.sourceEnd);
   }
   //public void missingEnclosingInstanceSpecification(ReferenceBinding
-  // enclosingType, AstNode location) {
+  // enclosingType, ASTNode location) {
   //   boolean insideConstructorCall =
   //           (location instanceof ExplicitConstructorCall)
   //                   && (((ExplicitConstructorCall) location).accessMode ==
@@ -1803,21 +1807,21 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
   public void needImplementation() {
     this.abortDueToInternalError(Util.bind("abort.missingCode")); //$NON-NLS-1$
   }
-  public void needToEmulateFieldReadAccess(FieldBinding field, AstNode location) {
+  public void needToEmulateFieldReadAccess(FieldBinding field, ASTNode location) {
     this.handle(IProblem.NeedToEmulateFieldReadAccess,
         new String[]{new String(field.declaringClass.readableName()),
             new String(field.name)}, new String[]{
             new String(field.declaringClass.shortReadableName()),
             new String(field.name)}, location.sourceStart, location.sourceEnd);
   }
-  public void needToEmulateFieldWriteAccess(FieldBinding field, AstNode location) {
+  public void needToEmulateFieldWriteAccess(FieldBinding field, ASTNode location) {
     this.handle(IProblem.NeedToEmulateFieldWriteAccess,
         new String[]{new String(field.declaringClass.readableName()),
             new String(field.name)}, new String[]{
             new String(field.declaringClass.shortReadableName()),
             new String(field.name)}, location.sourceStart, location.sourceEnd);
   }
-  public void needToEmulateMethodAccess(MethodBinding method, AstNode location) {
+  public void needToEmulateMethodAccess(MethodBinding method, ASTNode location) {
     if (method.isConstructor())
       this.handle(IProblem.NeedToEmulateConstructorAccess, new String[]{
           new String(method.declaringClass.readableName()),
@@ -1839,7 +1843,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         arguments, typeDecl.sourceStart, typeDecl.sourceEnd);
   }
   public void noMoreAvailableSpaceForArgument(LocalVariableBinding local,
-      AstNode location) {
+      ASTNode location) {
     String[] arguments = new String[]{new String(local.name)};
     this.handle(local instanceof SyntheticArgumentBinding
         ? IProblem.TooManySyntheticArgumentSlots
@@ -1847,12 +1851,12 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         location.sourceStart, location.sourceEnd);
   }
   public void noMoreAvailableSpaceForLocal(LocalVariableBinding local,
-      AstNode location) {
+      ASTNode location) {
     String[] arguments = new String[]{new String(local.name)};
     this.handle(IProblem.TooManyLocalVariableSlots, arguments, arguments, Abort
         | Error, location.sourceStart, location.sourceEnd);
   }
-  public void noSuchEnclosingInstance(TypeBinding targetType, AstNode location,
+  public void noSuchEnclosingInstance(TypeBinding targetType, ASTNode location,
       boolean isConstructorCall) {
     int id;
     if (isConstructorCall) {
@@ -1954,13 +1958,13 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
             new String(inheritedMethod.declaringClass.shortReadableName())},
         localMethod.sourceStart(), localMethod.sourceEnd());
   }
-  public void packageCollidesWithType(CompilationUnitDeclaration compUnitDecl) {
-    String[] arguments = new String[]{CharOperation
-        .toString(compUnitDecl.currentPackage.tokens)};
-    this.handle(IProblem.PackageCollidesWithType, arguments, arguments,
-        compUnitDecl.currentPackage.sourceStart,
-        compUnitDecl.currentPackage.sourceEnd);
-  }
+//  public void packageCollidesWithType(CompilationUnitDeclaration compUnitDecl) {
+//    String[] arguments = new String[]{CharOperation
+//        .toString(compUnitDecl.currentPackage.tokens)};
+//    this.handle(IProblem.PackageCollidesWithType, arguments, arguments,
+//        compUnitDecl.currentPackage.sourceStart,
+//        compUnitDecl.currentPackage.sourceEnd);
+//  }
   public void packageIsNotExpectedPackage(
       CompilationUnitDeclaration compUnitDecl) {
     String[] arguments = new String[]{CharOperation
@@ -2168,7 +2172,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         startPos, scanner.currentPosition - 1,
         parser.compilationUnit.compilationResult);
   }
-  public void shouldReturn(TypeBinding returnType, AstNode location) {
+  public void shouldReturn(TypeBinding returnType, ASTNode location) {
     this.handle(IProblem.ShouldReturnValue, new String[]{new String(returnType
         .readableName())}, new String[]{new String(returnType
         .shortReadableName())}, location.sourceStart, location.sourceEnd);
@@ -2237,7 +2241,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
             new String(abstractMethods[0].declaringClass.shortReadableName())},
         type.sourceStart(), type.sourceEnd());
   }
-  public void stringConstantIsExceedingUtf8Limit(AstNode location) {
+  public void stringConstantIsExceedingUtf8Limit(ASTNode location) {
     this.handle(IProblem.StringConstantIsExceedingUtf8Limit, NoArgument,
         NoArgument, location.sourceStart, location.sourceEnd);
   }
@@ -2272,7 +2276,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
                                               * surfaced in getMessage()
                                               */}, start, end);
   }
-  public void tooManyDimensions(AstNode expression) {
+  public void tooManyDimensions(ASTNode expression) {
     this.handle(IProblem.TooManyArrayDimensions, NoArgument, NoArgument,
         expression.sourceStart, expression.sourceEnd);
   }
@@ -2314,7 +2318,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         compUnitDecl.compilationResult);
   }
   public void typeMismatchError(TypeBinding resultType,
-      TypeBinding expectedType, AstNode location) {
+      TypeBinding expectedType, ASTNode location) {
     String resultTypeName = new String(resultType.readableName());
     String expectedTypeName = new String(expectedType.readableName());
     String resultTypeShortName = new String(resultType.shortReadableName());
@@ -2359,7 +2363,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
     this.handle(IProblem.UnexpectedStaticModifierForMethod, arguments,
         arguments, methodDecl.sourceStart, methodDecl.sourceEnd);
   }
-  public void unhandledException(TypeBinding exceptionType, AstNode location) {
+  public void unhandledException(TypeBinding exceptionType, ASTNode location) {
     boolean insideDefaultConstructor = (referenceContext instanceof ConstructorDeclaration)
         && ((ConstructorDeclaration) referenceContext).isDefaultConstructor();
     boolean insideImplicitConstructorCall = (location instanceof ExplicitConstructorCall)
@@ -2373,13 +2377,13 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         .shortReadableName())}, location.sourceStart, location.sourceEnd);
   }
   public void uninitializedBlankFinalField(FieldBinding binding,
-      AstNode location) {
+      ASTNode location) {
     String[] arguments = new String[]{new String(binding.readableName())};
     this.handle(IProblem.UninitializedBlankFinalField, arguments, arguments,
         location.sourceStart, location.sourceEnd);
   }
   public void uninitializedLocalVariable(LocalVariableBinding binding,
-      AstNode location) {
+      ASTNode location) {
     String[] arguments = new String[]{new String(binding.readableName())};
     this.handle(IProblem.UninitializedLocalVariable, arguments, arguments,
         location.sourceStart, location.sourceEnd);
@@ -2396,7 +2400,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         new String[]{new String(targetType.shortReadableName())},
         expression.sourceStart, expression.sourceEnd);
   }
-  public void unnecessaryReceiverForStaticMethod(AstNode location,
+  public void unnecessaryReceiverForStaticMethod(ASTNode location,
       MethodBinding method) {
     this.handle(IProblem.NonStaticAccessToStaticMethod, new String[]{
         new String(method.declaringClass.readableName()),
@@ -2405,7 +2409,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         new String(method.selector), parametersAsShortString(method)},
         location.sourceStart, location.sourceEnd);
   }
-  public void unnecessaryReceiverForStaticField(AstNode location,
+  public void unnecessaryReceiverForStaticField(ASTNode location,
       FieldBinding field) {
     this.handle(IProblem.NonStaticAccessToStaticField,
         new String[]{new String(field.declaringClass.readableName()),
@@ -2418,7 +2422,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
         statement.sourceStart, statement.sourceEnd);
   }
   public void unreachableExceptionHandler(ReferenceBinding exceptionType,
-      AstNode location) {
+      ASTNode location) {
     this.handle(IProblem.UnreachableCatch, NoArgument, NoArgument,
         location.sourceStart, location.sourceEnd);
   }
@@ -2439,11 +2443,11 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
     this.handle(IProblem.ArgumentIsNeverUsed, arguments, arguments,
         localDecl.sourceStart, localDecl.sourceEnd);
   }
-  public void unusedImport(ImportReference importRef) {
-    String[] arguments = new String[]{CharOperation.toString(importRef.tokens)};
-    this.handle(IProblem.UnusedImport, arguments, arguments,
-        importRef.sourceStart, importRef.sourceEnd);
-  }
+//  public void unusedImport(ImportReference importRef) {
+//    String[] arguments = new String[]{CharOperation.toString(importRef.tokens)};
+//    this.handle(IProblem.UnusedImport, arguments, arguments,
+//        importRef.sourceStart, importRef.sourceEnd);
+//  }
   public void unusedLocalVariable(LocalDeclaration localDecl) {
     String[] arguments = new String[]{localDecl.name()};
     this.handle(IProblem.LocalVariableIsNeverUsed, arguments, arguments,
@@ -2572,7 +2576,7 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
     this.handle(IProblem.UnreachableCatch, NoArgument, NoArgument,
         typeRef.sourceStart, typeRef.sourceEnd);
   }
-  public void nonExternalizedStringLiteral(AstNode location) {
+  public void nonExternalizedStringLiteral(ASTNode location) {
     this.handle(IProblem.NonExternalizedStringLiteral, NoArgument, NoArgument,
         location.sourceStart, location.sourceEnd);
   }
@@ -2701,7 +2705,27 @@ public class ProblemReporter extends ProblemHandler implements ProblemReasons {
   public void phpVarDeprecatedWarning(
       int problemStartPosition, int problemEndPosition,
       ReferenceContext context, CompilationResult compilationResult) {
+    if (computeSeverity(IProblem.PHPVarDeprecatedWarning) == Ignore)
+      return;
     this.handle(IProblem.PHPVarDeprecatedWarning, NoArgument, new String[]{},
         problemStartPosition, problemEndPosition, context, compilationResult);
   }
+  
+  public void phpKeywordWarning(String[] messageArguments,
+      int problemStartPosition, int problemEndPosition,
+      ReferenceContext context, CompilationResult compilationResult) {
+    if (computeSeverity(IProblem.PHPBadStyleKeywordWarning) == Ignore)
+      return;
+    this.handle(IProblem.PHPBadStyleKeywordWarning, NoArgument, messageArguments,
+        problemStartPosition, problemEndPosition, context, compilationResult);
+  }
+  
+  public void phpUppercaseIdentifierWarning( 
+      int problemStartPosition, int problemEndPosition,
+      ReferenceContext context, CompilationResult compilationResult) {
+    if (computeSeverity(IProblem.PHPBadStyleUppercaseIdentifierWarning) == Ignore)
+      return;
+    this.handle(IProblem.PHPBadStyleUppercaseIdentifierWarning, NoArgument, new String[]{},
+        problemStartPosition, problemEndPosition, context, compilationResult);
+  }
 }