-/**********************************************************************
-Copyright (c) 2002 IBM Corp. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Common Public License v0.5
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v05.html
-
-Contributors:
- IBM Corporation - initial API and implementation
-**********************************************************************/
-
+/*******************************************************************************
+ * 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 v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * IBM Corporation - added the following constants
+ * NonStaticAccessToStaticField
+ * NonStaticAccessToStaticMethod
+ * Task
+ * ExpressionShouldBeAVariable
+ * AssignmentHasNoEffect
+ * IBM Corporation - added the following constants
+ * TooManySyntheticArgumentSlots
+ * TooManyArrayDimensions
+ * TooManyBytesForStringConstant
+ * TooManyMethods
+ * TooManyFields
+ * NonBlankFinalLocalAssignment
+ * ObjectCannotHaveSuperTypes
+ * MissingSemiColon
+ * InvalidParenthesizedExpression
+ * EnclosingInstanceInConstructorCall
+ * BytecodeExceeds64KLimitForConstructor
+ * IncompatibleReturnTypeForNonInheritedInterfaceMethod
+ * UnusedPrivateMethod
+ * UnusedPrivateConstructor
+ * UnusedPrivateType
+ * UnusedPrivateField
+ * IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod
+ *******************************************************************************/
package net.sourceforge.phpdt.core.compiler;
import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReasons;
/**
* Problem Categories
* The high bits of a problem ID contains information about the category of a problem.
- * e.g. (problemID & TypeRelated) != 0, indicates that this problem is type related.
+ * For example, (problemID & TypeRelated) != 0, indicates that this problem is type related.
*
* A problem category can help to implement custom problem filters. Indeed, when numerous problems
* are listed, focusing on import related problems first might be relevant.
int ImportRelated = 0x10000000;
int Internal = 0x20000000;
int Syntax = 0x40000000;
-
+ /**
+ * @since 3.0
+ */
+ int Javadoc = 0x80000000;
/**
* Mask to use in order to filter out the category portion of the problem ID.
*/
int AmbiguousType = TypeRelated + 4;
int UsingDeprecatedType = TypeRelated + 5;
int InternalTypeNameProvided = TypeRelated + 6;
-
+ /** @since 2.1 */
+ int UnusedPrivateType = Internal + TypeRelated + 7;
+
int IncompatibleTypesInEqualityOperator = TypeRelated + 15;
int IncompatibleTypesInConditionalOperator = TypeRelated + 16;
int TypeMismatch = TypeRelated + 17;
int OuterLocalMustBeFinal = Internal + 25;
int CannotDefineInterfaceInLocalType = Internal + 26;
int IllegalPrimitiveOrArrayTypeForEnclosingInstance = TypeRelated + 27;
+ /** @since 2.1 */
+ int EnclosingInstanceInConstructorCall = Internal + 28;
int AnonymousClassCannotExtendFinalClass = TypeRelated + 29;
// variables
// local variables
int RedefinedLocal = Internal + 55;
int RedefinedArgument = Internal + 56;
- int DuplicateFinalLocalInitialization = Internal + 57;
// final local variables
+ int DuplicateFinalLocalInitialization = Internal + 57;
+ /** @since 2.1 */
+ int NonBlankFinalLocalAssignment = Internal + 58;
int FinalOuterLocalAssignment = Internal + 60;
int LocalVariableIsNeverUsed = Internal + 61;
int ArgumentIsNeverUsed = Internal + 62;
int BytecodeExceeds64KLimitForClinit = Internal + 64;
int TooManyArgumentSlots = Internal + 65;
int TooManyLocalVariableSlots = Internal + 66;
+ /** @since 2.1 */
+ int TooManySyntheticArgumentSlots = Internal + 67;
+ /** @since 2.1 */
+ int TooManyArrayDimensions = Internal + 68;
+ /** @since 2.1 */
+ int BytecodeExceeds64KLimitForConstructor = Internal + 69;
// fields
int UndefinedField = FieldRelated + 70;
int UsingDeprecatedField = FieldRelated + 73;
int NonStaticFieldFromStaticInvocation = FieldRelated + 74;
int ReferenceToForwardField = FieldRelated + Internal + 75;
-
+ /** @since 2.1 */
+ int NonStaticAccessToStaticField = Internal + FieldRelated + 76;
+ /** @since 2.1 */
+ int UnusedPrivateField = Internal + FieldRelated + 77;
+
// blank final fields
int FinalFieldAssignment = FieldRelated + 80;
int UninitializedBlankFinalField = FieldRelated + 81;
int NoMessageSendOnBaseType = MethodRelated + 114;
int ParameterMismatch = MethodRelated + 115;
int NoMessageSendOnArrayType = MethodRelated + 116;
-
+ /** @since 2.1 */
+ int NonStaticAccessToStaticMethod = Internal + MethodRelated + 117;
+ /** @since 2.1 */
+ int UnusedPrivateMethod = Internal + MethodRelated + 118;
+
// constructors
int UndefinedConstructor = ConstructorRelated + 130;
int NotVisibleConstructor = ConstructorRelated + 131;
int AmbiguousConstructor = ConstructorRelated + 132;
int UsingDeprecatedConstructor = ConstructorRelated + 133;
+ /** @since 2.1 */
+ int UnusedPrivateConstructor = Internal + MethodRelated + 134;
// explicit constructor calls
int InstanceFieldDuringConstructorInvocation = ConstructorRelated + 135;
int InstanceMethodDuringConstructorInvocation = ConstructorRelated + 136;
int InvalidNullToSynchronized = Internal + 176;
// throw
int CannotThrowNull = Internal + 177;
-
+ // assignment
+ /** @since 2.1 */
+ int AssignmentHasNoEffect = Internal + 178;
+
// inner emulation
int NeedToEmulateFieldReadAccess = FieldRelated + 190;
int NeedToEmulateFieldWriteAccess = FieldRelated + 191;
int ArrayConstantsOnlyInArrayInitializers = Syntax + Internal + 208;
int ParsingErrorOnKeyword = Syntax + Internal + 209;
int ParsingErrorOnKeywordNoSuggestion = Syntax + Internal + 210;
-
+ int PHPParsingError = Syntax + Internal + 211;
+ int PHPParsingWarning = Syntax + Internal + 212;
+ int PHPVarDeprecatedWarning = Syntax + Internal + 213;
+ int PHPBadStyleKeywordWarning = Syntax + Internal + 214;
+ int PHPBadStyleUppercaseIdentifierWarning = Syntax + Internal + 215;
+ int PHPIncludeNotExistWarning = Syntax + Internal + 216;
+
int UnmatchedBracket = Syntax + Internal + 220;
int NoFieldOnBaseType = FieldRelated + 221;
int InvalidExpressionAsStatement = Syntax + Internal + 222;
+ /** @since 2.1 */
+ int ExpressionShouldBeAVariable = Syntax + Internal + 223;
+ /** @since 2.1 */
+ int MissingSemiColon = Syntax + Internal + 224;
+ /** @since 2.1 */
+ int InvalidParenthesizedExpression = Syntax + Internal + 225;
// scanner errors
int EndOfSource = Syntax + Internal + 250;
int MustSpecifyPackage = 326;
int HierarchyHasProblems = TypeRelated + 327;
int PackageIsNotExpectedPackage = 328;
+ /** @since 2.1 */
+ int ObjectCannotHaveSuperTypes = 329;
// int InvalidSuperclassBase = TypeRelated + 329; // reserved to 334 included
int SuperclassNotFound = TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
int OverridingNonVisibleMethod = MethodRelated + 410;
int AbstractMethodCannotBeOverridden = MethodRelated + 411;
int OverridingDeprecatedMethod = MethodRelated + 412;
-
+ /** @since 2.1 */
+ int IncompatibleReturnTypeForNonInheritedInterfaceMethod = MethodRelated + 413;
+ /** @since 2.1 */
+ int IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod = MethodRelated + 414;
+
// code snippet support
int CodeSnippetMissingClass = Internal + 420;
int CodeSnippetMissingMethod = Internal + 421;
//constant pool
int TooManyConstantsInConstantPool = Internal + 430;
-
+ /** @since 2.1 */
+ int TooManyBytesForStringConstant = Internal + 431;
+
+ // static constraints
+ /** @since 2.1 */
+ int TooManyFields = Internal + 432;
+ /** @since 2.1 */
+ int TooManyMethods = Internal + 433;
+
// 1.4 features
// assertion warning
int UseAssertAsAnIdentifier = Internal + 440;
+
+ // detected task
+ /** @since 2.1 */
+ int Task = Internal + 450;
+
+// block
+ /** @since 3.0 */
+ int UndocumentedEmptyBlock = Internal + 460;
+
+ /*
+ * Javadoc comments
+ */
+ /** @since 3.0 */
+ int JavadocUnexpectedTag = Javadoc + Internal + 470;
+ /** @since 3.0 */
+ int JavadocMissingParamTag = Javadoc + Internal + 471;
+ /** @since 3.0 */
+ int JavadocMissingParamName = Javadoc + Internal + 472;
+ /** @since 3.0 */
+ int JavadocDuplicateParamName = Javadoc + Internal + 473;
+ /** @since 3.0 */
+ int JavadocInvalidParamName = Javadoc + Internal + 474;
+ /** @since 3.0 */
+ int JavadocMissingReturnTag = Javadoc + Internal + 475;
+ /** @since 3.0 */
+ int JavadocDuplicateReturnTag = Javadoc + Internal + 476;
+ /** @since 3.0 */
+ int JavadocMissingThrowsTag = Javadoc + Internal + 477;
+ /** @since 3.0 */
+ int JavadocMissingThrowsClassName = Javadoc + Internal + 478;
+ /** @since 3.0 */
+ int JavadocInvalidThrowsClass = Javadoc + Internal + 479;
+ /** @since 3.0 */
+ int JavadocDuplicateThrowsClassName = Javadoc + Internal + 480;
+ /** @since 3.0 */
+ int JavadocInvalidThrowsClassName = Javadoc + Internal + 481;
+ /** @since 3.0 */
+ int JavadocMissingSeeReference = Javadoc + Internal + 482;
+ /** @since 3.0 */
+ int JavadocInvalidSeeReference = Javadoc + Internal + 483;
+ /** @since 3.0 */
+ int JavadocInvalidSeeHref = Javadoc + Internal + 484;
+ /** @since 3.0 */
+ int JavadocInvalidSeeArgs = Javadoc + Internal + 485;
+ /** @since 3.0 */
+ int JavadocMissing = Javadoc + Internal + 486;
+ /** @since 3.0 */
+ int JavadocInvalidTag = Javadoc + Internal + 487;
+ /*
+ * ID for field errors in Javadoc
+ */
+ /** @since 3.0 */
+ int JavadocUndefinedField = Javadoc + Internal + 488;
+ /** @since 3.0 */
+ int JavadocNotVisibleField = Javadoc + Internal + 489;
+ /** @since 3.0 */
+ int JavadocAmbiguousField = Javadoc + Internal + 490;
+ /** @since 3.0 */
+ int JavadocUsingDeprecatedField = Javadoc + Internal + 491;
+ /*
+ * IDs for constructor errors in Javadoc
+ */
+ /** @since 3.0 */
+ int JavadocUndefinedConstructor = Javadoc + Internal + 492;
+ /** @since 3.0 */
+ int JavadocNotVisibleConstructor = Javadoc + Internal + 493;
+ /** @since 3.0 */
+ int JavadocAmbiguousConstructor = Javadoc + Internal + 494;
+ /** @since 3.0 */
+ int JavadocUsingDeprecatedConstructor = Javadoc + Internal + 495;
+ /*
+ * IDs for method errors in Javadoc
+ */
+ /** @since 3.0 */
+ int JavadocUndefinedMethod = Javadoc + Internal + 496;
+ /** @since 3.0 */
+ int JavadocNotVisibleMethod = Javadoc + Internal + 497;
+ /** @since 3.0 */
+ int JavadocAmbiguousMethod = Javadoc + Internal + 498;
+ /** @since 3.0 */
+ int JavadocUsingDeprecatedMethod = Javadoc + Internal + 499;
+ /** @since 3.0 */
+ int JavadocNoMessageSendOnBaseType = Javadoc + Internal + 500;
+ /** @since 3.0 */
+ int JavadocParameterMismatch = Javadoc + Internal + 501;
+ /** @since 3.0 */
+ int JavadocNoMessageSendOnArrayType = Javadoc + Internal + 502;
+ /*
+ * IDs for type errors in Javadoc
+ */
+ /** @since 3.0 */
+ int JavadocUndefinedType = Javadoc + Internal + 503;
+ /** @since 3.0 */
+ int JavadocNotVisibleType = Javadoc + Internal + 504;
+ /** @since 3.0 */
+ int JavadocAmbiguousType = Javadoc + Internal + 505;
+ /** @since 3.0 */
+ int JavadocUsingDeprecatedType = Javadoc + Internal + 506;
+ /** @since 3.0 */
+ int JavadocInternalTypeNameProvided = Javadoc + Internal + 507;
+ /** @since 3.0 */
+ int JavadocInheritedMethodHidesEnclosingName = Javadoc + Internal + 508;
+ /** @since 3.0 */
+ int JavadocInheritedFieldHidesEnclosingName = Javadoc + Internal + 509;
+ /** @since 3.0 */
+ int JavadocInheritedNameHidesEnclosingTypeName = Javadoc + Internal + 510;
+ /** @since 3.0 */
+ int JavadocAmbiguousMethodReference = Javadoc + Internal + 511;
+ /** @since 3.0 */
+ int JavadocUnterminatedInlineTag = Javadoc + Internal + 512;
+ /** @since 3.0 */
+ int JavadocMalformedSeeReference = Javadoc + Internal + 513;
+ /** @since 3.0 */
+ int JavadocMessagePrefix = Internal + 515;
}