Syntax highlighting is changeable.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / problem / ProblemReporter.java
index 78baf7d..29ba040 100644 (file)
@@ -39,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;
@@ -87,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);
@@ -135,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);
@@ -251,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$
@@ -262,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);
@@ -305,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);
   }
@@ -326,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);
   }
@@ -607,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()),
@@ -630,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
@@ -665,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);
@@ -754,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);
@@ -1014,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())},
@@ -1050,7 +1050,7 @@ 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);
   }
@@ -1223,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())},
@@ -1240,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);
   }
@@ -1293,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);
   }
@@ -1601,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);
   }
@@ -1681,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 :
@@ -1736,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);
   }
@@ -1756,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 ==
@@ -1807,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()),
@@ -1843,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
@@ -1851,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) {
@@ -2172,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);
@@ -2241,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);
   }
@@ -2276,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);
   }
@@ -2318,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());
@@ -2363,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)
@@ -2377,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);
@@ -2400,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()),
@@ -2409,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()),
@@ -2422,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);
   }
@@ -2576,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);
   }