improved PHP parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / compiler / IProblem.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *     IBM Corporation - added the following constants
11  *                                 NonStaticAccessToStaticField
12  *                                 NonStaticAccessToStaticMethod
13  *                                 Task
14  *                                                                 ExpressionShouldBeAVariable
15  *                                                                 AssignmentHasNoEffect
16  *     IBM Corporation - added the following constants
17  *                                                                 TooManySyntheticArgumentSlots
18  *                                                                 TooManyArrayDimensions
19  *                                                                 TooManyBytesForStringConstant
20  *                                                                 TooManyMethods
21  *                                                                 TooManyFields
22  *                                                                 NonBlankFinalLocalAssignment
23  *                                                                 ObjectCannotHaveSuperTypes
24  *                                                                 MissingSemiColon
25  *                                                                 InvalidParenthesizedExpression
26  *                                                                 EnclosingInstanceInConstructorCall
27  *                                                                 BytecodeExceeds64KLimitForConstructor
28  *                                                                 IncompatibleReturnTypeForNonInheritedInterfaceMethod
29  *                                                                 UnusedPrivateMethod
30  *                                                                 UnusedPrivateConstructor
31  *                                                                 UnusedPrivateType
32  *                                                                 UnusedPrivateField
33  *                                                                 IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod
34  *******************************************************************************/
35 package net.sourceforge.phpdt.core.compiler;
36  
37 import net.sourceforge.phpdt.internal.compiler.lookup.ProblemReasons;
38
39 /**
40  * Description of a Java problem, as detected by the compiler or some of the underlying
41  * technology reusing the compiler. 
42  * A problem provides access to:
43  * <ul>
44  * <li> its location (originating source file name, source position, line number), </li>
45  * <li> its message description and a predicate to check its severity (warning or error). </li>
46  * <li> its ID : an number identifying the very nature of this problem. All possible IDs are listed
47  * as constants on this interface. </li>
48  * </ul>
49  * 
50  * Note: the compiler produces IProblems internally, which are turned into markers by the JavaBuilder
51  * so as to persist problem descriptions. This explains why there is no API allowing to reach IProblem detected
52  * when compiling. However, the Java problem markers carry equivalent information to IProblem, in particular
53  * their ID (attribute "id") is set to one of the IDs defined on this interface.
54  * 
55  * @since 2.0
56  */
57 public interface IProblem { 
58         
59         /**
60          * Answer back the original arguments recorded into the problem.
61          * @return the original arguments recorded into the problem
62          */
63         String[] getArguments();
64
65         /**
66          * Returns the problem id
67          * 
68          * @return the problem id
69          */
70         int getID();
71
72         /**
73          * Answer a localized, human-readable message string which describes the problem.
74          * 
75          * @return a localized, human-readable message string which describes the problem
76          */
77         String getMessage();
78
79         /**
80          * Answer the file name in which the problem was found.
81          * 
82          * @return the file name in which the problem was found
83          */
84         char[] getOriginatingFileName();
85         
86         /**
87          * Answer the end position of the problem (inclusive), or -1 if unknown.
88          * 
89          * @return the end position of the problem (inclusive), or -1 if unknown
90          */
91         int getSourceEnd();
92
93         /**
94          * Answer the line number in source where the problem begins.
95          * 
96          * @return the line number in source where the problem begins
97          */
98         int getSourceLineNumber();
99
100         /**
101          * Answer the start position of the problem (inclusive), or -1 if unknown.
102          * 
103          * @return the start position of the problem (inclusive), or -1 if unknown
104          */
105         int getSourceStart();
106
107         /**
108          * Checks the severity to see if the Error bit is set.
109          * 
110          * @return true if the Error bit is set for the severity, false otherwise
111          */
112         boolean isError();
113
114         /**
115          * Checks the severity to see if the Error bit is not set.
116          * 
117          * @return true if the Error bit is not set for the severity, false otherwise
118          */
119         boolean isWarning();
120
121         /**
122          * Set the end position of the problem (inclusive), or -1 if unknown.
123          * Used for shifting problem positions.
124          * 
125          * @param sourceEnd the given end position
126          */
127         void setSourceEnd(int sourceEnd);
128
129         /**
130          * Set the line number in source where the problem begins.
131          * 
132          * @param lineNumber the given line number
133          */
134         void setSourceLineNumber(int lineNumber);
135
136         /**
137          * Set the start position of the problem (inclusive), or -1 if unknown.
138          * Used for shifting problem positions.
139          * 
140          * @param the given start position
141          */
142         void setSourceStart(int sourceStart);
143         
144         /**
145          * Problem Categories
146          * The high bits of a problem ID contains information about the category of a problem. 
147          * For example, (problemID & TypeRelated) != 0, indicates that this problem is type related.
148          * 
149          * A problem category can help to implement custom problem filters. Indeed, when numerous problems
150          * are listed, focusing on import related problems first might be relevant.
151          * 
152          * When a problem is tagged as Internal, it means that no change other than a local source code change
153          * can  fix the corresponding problem.
154          */
155         int TypeRelated = 0x01000000;
156         int FieldRelated = 0x02000000;
157         int MethodRelated = 0x04000000;
158         int ConstructorRelated = 0x08000000;
159         int ImportRelated = 0x10000000;
160         int Internal = 0x20000000;
161         int Syntax =  0x40000000;
162         /**
163          * @since 3.0
164          */
165         int Javadoc = 0x80000000;
166         /**
167          * Mask to use in order to filter out the category portion of the problem ID.
168          */
169         int IgnoreCategoriesMask = 0xFFFFFF;
170
171         /**
172          * Below are listed all available problem IDs. Note that this list could be augmented in the future, 
173          * as new features are added to the Java core implementation.
174          */
175
176         /**
177          * ID reserved for referencing an internal error inside the JavaCore implementation which
178          * may be surfaced as a problem associated with the compilation unit which caused it to occur.
179          */
180         int Unclassified = 0;
181
182         /**
183          * Generic type related problems
184          */
185         int ObjectHasNoSuperclass = TypeRelated + 1;
186         int UndefinedType = TypeRelated + 2;
187         int NotVisibleType = TypeRelated + 3;
188         int AmbiguousType = TypeRelated + 4;
189         int UsingDeprecatedType = TypeRelated + 5;
190         int InternalTypeNameProvided = TypeRelated + 6;
191         /** @since 2.1 */
192         int UnusedPrivateType = Internal + TypeRelated + 7;
193         
194         int IncompatibleTypesInEqualityOperator = TypeRelated + 15;
195         int IncompatibleTypesInConditionalOperator = TypeRelated + 16;
196         int TypeMismatch = TypeRelated + 17;
197
198         /**
199          * Inner types related problems
200          */
201         int MissingEnclosingInstanceForConstructorCall = TypeRelated + 20;
202         int MissingEnclosingInstance = TypeRelated + 21;
203         int IncorrectEnclosingInstanceReference = TypeRelated + 22;
204         int IllegalEnclosingInstanceSpecification = TypeRelated + 23; 
205         int CannotDefineStaticInitializerInLocalType = Internal + 24;
206         int OuterLocalMustBeFinal = Internal + 25;
207         int CannotDefineInterfaceInLocalType = Internal + 26;
208         int IllegalPrimitiveOrArrayTypeForEnclosingInstance = TypeRelated + 27;
209         /** @since 2.1 */
210         int EnclosingInstanceInConstructorCall = Internal + 28;
211         int AnonymousClassCannotExtendFinalClass = TypeRelated + 29;
212
213         // variables
214         int UndefinedName = 50;
215         int UninitializedLocalVariable = Internal + 51;
216         int VariableTypeCannotBeVoid = Internal + 52;
217         int VariableTypeCannotBeVoidArray = Internal + 53;
218         int CannotAllocateVoidArray = Internal + 54;
219         // local variables
220         int RedefinedLocal = Internal + 55;
221         int RedefinedArgument = Internal + 56;
222         // final local variables
223         int DuplicateFinalLocalInitialization = Internal + 57;
224         /** @since 2.1 */
225         int NonBlankFinalLocalAssignment = Internal + 58;
226         int FinalOuterLocalAssignment = Internal + 60;
227         int LocalVariableIsNeverUsed = Internal + 61;
228         int ArgumentIsNeverUsed = Internal + 62;
229         int BytecodeExceeds64KLimit = Internal + 63;
230         int BytecodeExceeds64KLimitForClinit = Internal + 64;
231         int TooManyArgumentSlots = Internal + 65;
232         int TooManyLocalVariableSlots = Internal + 66;
233         /** @since 2.1 */
234         int TooManySyntheticArgumentSlots = Internal + 67;
235         /** @since 2.1 */
236         int TooManyArrayDimensions = Internal + 68;
237         /** @since 2.1 */
238         int BytecodeExceeds64KLimitForConstructor = Internal + 69;
239
240         // fields
241         int UndefinedField = FieldRelated + 70;
242         int NotVisibleField = FieldRelated + 71;
243         int AmbiguousField = FieldRelated + 72;
244         int UsingDeprecatedField = FieldRelated + 73;
245         int NonStaticFieldFromStaticInvocation = FieldRelated + 74;
246         int ReferenceToForwardField = FieldRelated + Internal + 75;
247         /** @since 2.1 */
248         int NonStaticAccessToStaticField = Internal + FieldRelated + 76;
249         /** @since 2.1 */
250         int UnusedPrivateField = Internal + FieldRelated + 77;
251         
252         // blank final fields
253         int FinalFieldAssignment = FieldRelated + 80;
254         int UninitializedBlankFinalField = FieldRelated + 81;
255         int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
256
257         // methods
258         int UndefinedMethod = MethodRelated + 100;
259         int NotVisibleMethod = MethodRelated + 101;
260         int AmbiguousMethod = MethodRelated + 102;
261         int UsingDeprecatedMethod = MethodRelated + 103;
262         int DirectInvocationOfAbstractMethod = MethodRelated + 104;
263         int VoidMethodReturnsValue = MethodRelated + 105;
264         int MethodReturnsVoid = MethodRelated + 106;
265         int MethodRequiresBody = Internal + MethodRelated + 107;
266         int ShouldReturnValue = Internal + MethodRelated + 108;
267         int MethodButWithConstructorName = MethodRelated + 110;
268         int MissingReturnType = TypeRelated + 111;
269         int BodyForNativeMethod = Internal + MethodRelated + 112;
270         int BodyForAbstractMethod = Internal + MethodRelated + 113;
271         int NoMessageSendOnBaseType = MethodRelated + 114;
272         int ParameterMismatch = MethodRelated + 115;
273         int NoMessageSendOnArrayType = MethodRelated + 116;
274         /** @since 2.1 */
275     int NonStaticAccessToStaticMethod = Internal + MethodRelated + 117;
276         /** @since 2.1 */
277         int UnusedPrivateMethod = Internal + MethodRelated + 118;
278             
279         // constructors
280         int UndefinedConstructor = ConstructorRelated + 130;
281         int NotVisibleConstructor = ConstructorRelated + 131;
282         int AmbiguousConstructor = ConstructorRelated + 132;
283         int UsingDeprecatedConstructor = ConstructorRelated + 133;
284         /** @since 2.1 */
285         int UnusedPrivateConstructor = Internal + MethodRelated + 134;
286         // explicit constructor calls
287         int InstanceFieldDuringConstructorInvocation = ConstructorRelated + 135;
288         int InstanceMethodDuringConstructorInvocation = ConstructorRelated + 136;
289         int RecursiveConstructorInvocation = ConstructorRelated + 137;
290         int ThisSuperDuringConstructorInvocation = ConstructorRelated + 138;
291         // implicit constructor calls
292         int UndefinedConstructorInDefaultConstructor = ConstructorRelated + 140;
293         int NotVisibleConstructorInDefaultConstructor = ConstructorRelated + 141;
294         int AmbiguousConstructorInDefaultConstructor = ConstructorRelated + 142;
295         int UndefinedConstructorInImplicitConstructorCall = ConstructorRelated + 143;
296         int NotVisibleConstructorInImplicitConstructorCall = ConstructorRelated + 144;
297         int AmbiguousConstructorInImplicitConstructorCall = ConstructorRelated + 145;
298         int UnhandledExceptionInDefaultConstructor = TypeRelated + 146;
299         int UnhandledExceptionInImplicitConstructorCall = TypeRelated + 147;
300                                 
301         // expressions
302         int ArrayReferenceRequired = Internal + 150;
303         int NoImplicitStringConversionForCharArrayExpression = Internal + 151;
304         // constant expressions
305         int StringConstantIsExceedingUtf8Limit = Internal + 152;
306         int NonConstantExpression = 153;
307         int NumericValueOutOfRange = Internal + 154;
308         // cast expressions
309         int IllegalCast = TypeRelated + 156;
310         // allocations
311         int InvalidClassInstantiation = TypeRelated + 157;
312         int CannotDefineDimensionExpressionsWithInit = Internal + 158;
313         int MustDefineEitherDimensionExpressionsOrInitializer = Internal + 159;
314         // operators
315         int InvalidOperator = Internal + 160;
316         // statements
317         int CodeCannotBeReached = Internal + 161;
318         int CannotReturnInInitializer = Internal + 162;
319         int InitializerMustCompleteNormally = Internal + 163;
320         
321         // assert
322         int InvalidVoidExpression = Internal + 164;
323         // try
324         int MaskedCatch = TypeRelated + 165;
325         int DuplicateDefaultCase = 166;
326         int UnreachableCatch = TypeRelated + MethodRelated + 167;
327         int UnhandledException = TypeRelated + 168;
328         // switch       
329         int IncorrectSwitchType = TypeRelated + 169;
330         int DuplicateCase = FieldRelated + 170;
331         // labelled
332         int DuplicateLabel = Internal + 171;
333         int InvalidBreak = Internal + 172;
334         int InvalidContinue = Internal + 173;
335         int UndefinedLabel = Internal + 174;
336         //synchronized
337         int InvalidTypeToSynchronized = Internal + 175;
338         int InvalidNullToSynchronized = Internal + 176;
339         // throw
340         int CannotThrowNull = Internal + 177;
341         // assignment
342         /** @since 2.1 */
343         int AssignmentHasNoEffect = Internal + 178;
344         
345         // inner emulation
346         int NeedToEmulateFieldReadAccess = FieldRelated + 190;
347         int NeedToEmulateFieldWriteAccess = FieldRelated + 191;
348         int NeedToEmulateMethodAccess = MethodRelated + 192;
349         int NeedToEmulateConstructorAccess = MethodRelated + 193;
350
351         //inherited name hides enclosing name (sort of ambiguous)
352         int InheritedMethodHidesEnclosingName = MethodRelated + 195;
353         int InheritedFieldHidesEnclosingName = FieldRelated + 196;
354         int InheritedTypeHidesEnclosingName = TypeRelated + 197;
355
356         // miscellaneous
357         int ThisInStaticContext = Internal + 200;
358         int StaticMethodRequested = Internal + MethodRelated + 201;
359         int IllegalDimension = Internal + 202;
360         int InvalidTypeExpression = Internal + 203;
361         int ParsingError = Syntax + Internal + 204;
362         int ParsingErrorNoSuggestion = Syntax + Internal + 205;
363         int InvalidUnaryExpression = Syntax + Internal + 206;
364
365         // syntax errors
366         int InterfaceCannotHaveConstructors = Syntax + Internal + 207;
367         int ArrayConstantsOnlyInArrayInitializers = Syntax + Internal + 208;
368         int ParsingErrorOnKeyword = Syntax + Internal + 209;    
369         int ParsingErrorOnKeywordNoSuggestion = Syntax + Internal + 210;
370         int PHPParsingError = Syntax + Internal + 211;
371         int PHPParsingWarning = Syntax + Internal + 212;
372         int PHPVarDeprecatedWarning = Syntax + Internal + 213;
373         int PHPBadStyleKeywordWarning = Syntax + Internal + 214;
374         int PHPBadStyleUppercaseIdentifierWarning = Syntax + Internal + 215;
375         int PHPIncludeNotExistWarning = Syntax + Internal + 216;
376         
377         int UnmatchedBracket = Syntax + Internal + 220;
378         int NoFieldOnBaseType = FieldRelated + 221;
379         int InvalidExpressionAsStatement = Syntax + Internal + 222;
380         /** @since 2.1 */
381         int ExpressionShouldBeAVariable = Syntax + Internal + 223;
382         /** @since 2.1 */
383         int MissingSemiColon = Syntax + Internal + 224;
384         /** @since 2.1 */
385         int InvalidParenthesizedExpression = Syntax + Internal + 225;
386     
387         // scanner errors
388         int EndOfSource = Syntax + Internal + 250;
389         int InvalidHexa = Syntax + Internal + 251;
390         int InvalidOctal = Syntax + Internal + 252;
391         int InvalidCharacterConstant = Syntax + Internal + 253;
392         int InvalidEscape = Syntax + Internal + 254;
393         int InvalidInput = Syntax + Internal + 255;
394         int InvalidUnicodeEscape = Syntax + Internal + 256;
395         int InvalidFloat = Syntax + Internal + 257;
396         int NullSourceString = Syntax + Internal + 258;
397         int UnterminatedString = Syntax + Internal + 259;
398         int UnterminatedComment = Syntax + Internal + 260;
399
400         // type related problems
401         int InterfaceCannotHaveInitializers = TypeRelated + 300;
402         int DuplicateModifierForType = TypeRelated + 301;
403         int IllegalModifierForClass = TypeRelated + 302;
404         int IllegalModifierForInterface = TypeRelated + 303;
405         int IllegalModifierForMemberClass = TypeRelated + 304;
406         int IllegalModifierForMemberInterface = TypeRelated + 305;
407         int IllegalModifierForLocalClass = TypeRelated + 306;
408
409         int IllegalModifierCombinationFinalAbstractForClass = TypeRelated + 308;
410         int IllegalVisibilityModifierForInterfaceMemberType = TypeRelated + 309;
411         int IllegalVisibilityModifierCombinationForMemberType = TypeRelated + 310;
412         int IllegalStaticModifierForMemberType = TypeRelated + 311;
413         int SuperclassMustBeAClass = TypeRelated + 312;
414         int ClassExtendFinalClass = TypeRelated + 313;
415         int DuplicateSuperInterface = TypeRelated + 314;
416         int SuperInterfaceMustBeAnInterface = TypeRelated + 315;
417         int HierarchyCircularitySelfReference = TypeRelated + 316;
418         int HierarchyCircularity = TypeRelated + 317;
419         int HidingEnclosingType = TypeRelated + 318;
420         int DuplicateNestedType = TypeRelated + 319;
421         int CannotThrowType = TypeRelated + 320;
422         int PackageCollidesWithType = TypeRelated + 321;
423         int TypeCollidesWithPackage = TypeRelated + 322;
424         int DuplicateTypes = TypeRelated + 323;
425         int IsClassPathCorrect = TypeRelated + 324;
426         int PublicClassMustMatchFileName = TypeRelated + 325;
427         int MustSpecifyPackage = 326;
428         int HierarchyHasProblems = TypeRelated + 327;
429         int PackageIsNotExpectedPackage = 328;
430         /** @since 2.1 */
431         int ObjectCannotHaveSuperTypes = 329;
432
433         // int InvalidSuperclassBase = TypeRelated + 329; // reserved to 334 included
434         int SuperclassNotFound =  TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
435         int SuperclassNotVisible =  TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331
436         int SuperclassAmbiguous =  TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332
437         int SuperclassInternalNameProvided =  TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333
438         int SuperclassInheritedNameHidesEnclosingName =  TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334
439
440         // int InvalidInterfaceBase = TypeRelated + 334; // reserved to 339 included
441         int InterfaceNotFound =  TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335
442         int InterfaceNotVisible =  TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336
443         int InterfaceAmbiguous =  TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337
444         int InterfaceInternalNameProvided =  TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338
445         int InterfaceInheritedNameHidesEnclosingName =  TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339
446
447         // field related problems
448         int DuplicateField = FieldRelated + 340;
449         int DuplicateModifierForField = FieldRelated + 341;
450         int IllegalModifierForField = FieldRelated + 342;
451         int IllegalModifierForInterfaceField = FieldRelated + 343;
452         int IllegalVisibilityModifierCombinationForField = FieldRelated + 344;
453         int IllegalModifierCombinationFinalVolatileForField = FieldRelated + 345;
454         int UnexpectedStaticModifierForField = FieldRelated + 346;
455
456         // int FieldTypeProblemBase = FieldRelated + 349; //reserved to 354
457         int FieldTypeNotFound =  FieldRelated + 349 + ProblemReasons.NotFound; // FieldRelated + 350
458         int FieldTypeNotVisible =  FieldRelated + 349 + ProblemReasons.NotVisible; // FieldRelated + 351
459         int FieldTypeAmbiguous =  FieldRelated + 349 + ProblemReasons.Ambiguous; // FieldRelated + 352
460         int FieldTypeInternalNameProvided =  FieldRelated + 349 + ProblemReasons.InternalNameProvided; // FieldRelated + 353
461         int FieldTypeInheritedNameHidesEnclosingName =  FieldRelated + 349 + ProblemReasons.InheritedNameHidesEnclosingName; // FieldRelated + 354
462         
463         // method related problems
464         int DuplicateMethod = MethodRelated + 355;
465         int IllegalModifierForArgument = MethodRelated + 356;
466         int DuplicateModifierForMethod = MethodRelated + 357;
467         int IllegalModifierForMethod = MethodRelated + 358;
468         int IllegalModifierForInterfaceMethod = MethodRelated + 359;
469         int IllegalVisibilityModifierCombinationForMethod = MethodRelated + 360;
470         int UnexpectedStaticModifierForMethod = MethodRelated + 361;
471         int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362;
472         int AbstractMethodInAbstractClass = MethodRelated + 363;
473         int ArgumentTypeCannotBeVoid = MethodRelated + 364;
474         int ArgumentTypeCannotBeVoidArray = MethodRelated + 365;
475         int ReturnTypeCannotBeVoidArray = MethodRelated + 366;
476         int NativeMethodsCannotBeStrictfp = MethodRelated + 367;
477         int DuplicateModifierForArgument = MethodRelated + 368;
478
479         //      int ArgumentProblemBase = MethodRelated + 369; // reserved to 374 included.
480         int ArgumentTypeNotFound =  MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370
481         int ArgumentTypeNotVisible =  MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371
482         int ArgumentTypeAmbiguous =  MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372
483         int ArgumentTypeInternalNameProvided =  MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373
484         int ArgumentTypeInheritedNameHidesEnclosingName =  MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374
485
486         //      int ExceptionTypeProblemBase = MethodRelated + 374; // reserved to 379 included.
487         int ExceptionTypeNotFound =  MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375
488         int ExceptionTypeNotVisible =  MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376
489         int ExceptionTypeAmbiguous =  MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377
490         int ExceptionTypeInternalNameProvided =  MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378
491         int ExceptionTypeInheritedNameHidesEnclosingName =  MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379
492
493         //      int ReturnTypeProblemBase = MethodRelated + 379;
494         int ReturnTypeNotFound =  MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380
495         int ReturnTypeNotVisible =  MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381
496         int ReturnTypeAmbiguous =  MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382
497         int ReturnTypeInternalNameProvided =  MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383
498         int ReturnTypeInheritedNameHidesEnclosingName =  MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384
499
500         // import related problems
501         int ConflictingImport = ImportRelated + 385;
502         int DuplicateImport = ImportRelated + 386;
503         int CannotImportPackage = ImportRelated + 387;
504         int UnusedImport = ImportRelated + 388;
505
506         //      int ImportProblemBase = ImportRelated + 389;
507         int ImportNotFound =  ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390
508         int ImportNotVisible =  ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391
509         int ImportAmbiguous =  ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392
510         int ImportInternalNameProvided =  ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393
511         int ImportInheritedNameHidesEnclosingName =  ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394
512
513         
514         // local variable related problems
515         int DuplicateModifierForVariable = MethodRelated + 395;
516         int IllegalModifierForVariable = MethodRelated + 396;
517
518         // method verifier problems
519         int AbstractMethodMustBeImplemented = MethodRelated + 400;
520         int FinalMethodCannotBeOverridden = MethodRelated + 401;
521         int IncompatibleExceptionInThrowsClause = MethodRelated + 402;
522         int IncompatibleExceptionInInheritedMethodThrowsClause = MethodRelated + 403;
523         int IncompatibleReturnType = MethodRelated + 404;
524         int InheritedMethodReducesVisibility = MethodRelated + 405;
525         int CannotOverrideAStaticMethodWithAnInstanceMethod = MethodRelated + 406;
526         int CannotHideAnInstanceMethodWithAStaticMethod = MethodRelated + 407;
527         int StaticInheritedMethodConflicts = MethodRelated + 408;
528         int MethodReducesVisibility = MethodRelated + 409;
529         int OverridingNonVisibleMethod = MethodRelated + 410;
530         int AbstractMethodCannotBeOverridden = MethodRelated + 411;
531         int OverridingDeprecatedMethod = MethodRelated + 412;
532         /** @since 2.1 */
533         int IncompatibleReturnTypeForNonInheritedInterfaceMethod = MethodRelated + 413;
534         /** @since 2.1 */
535         int IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod = MethodRelated + 414;
536         
537         // code snippet support
538         int CodeSnippetMissingClass = Internal + 420;
539         int CodeSnippetMissingMethod = Internal + 421;
540         int NonExternalizedStringLiteral = Internal + 261;
541         int CannotUseSuperInCodeSnippet = Internal + 422;
542         
543         //constant pool
544         int TooManyConstantsInConstantPool = Internal + 430;
545         /** @since 2.1 */
546         int TooManyBytesForStringConstant = Internal + 431;
547
548         // static constraints
549         /** @since 2.1 */
550         int TooManyFields = Internal + 432;
551         /** @since 2.1 */
552         int TooManyMethods = Internal + 433; 
553                 
554         // 1.4 features
555         // assertion warning
556         int UseAssertAsAnIdentifier = Internal + 440;
557         
558         // detected task
559         /** @since 2.1 */
560         int Task = Internal + 450;
561         
562 //       block
563         /** @since 3.0 */
564         int UndocumentedEmptyBlock = Internal + 460;
565                 
566         /*
567          * Javadoc comments
568          */
569         /** @since 3.0 */
570         int JavadocUnexpectedTag = Javadoc + Internal + 470;
571         /** @since 3.0 */
572         int JavadocMissingParamTag = Javadoc + Internal + 471;
573         /** @since 3.0 */
574         int JavadocMissingParamName = Javadoc + Internal + 472;
575         /** @since 3.0 */
576         int JavadocDuplicateParamName = Javadoc + Internal + 473;
577         /** @since 3.0 */
578         int JavadocInvalidParamName = Javadoc + Internal + 474;
579         /** @since 3.0 */
580         int JavadocMissingReturnTag = Javadoc + Internal + 475;
581         /** @since 3.0 */
582         int JavadocDuplicateReturnTag = Javadoc + Internal + 476;
583         /** @since 3.0 */
584         int JavadocMissingThrowsTag = Javadoc + Internal + 477;
585         /** @since 3.0 */
586         int JavadocMissingThrowsClassName = Javadoc + Internal + 478;
587         /** @since 3.0 */
588         int JavadocInvalidThrowsClass = Javadoc + Internal + 479;
589         /** @since 3.0 */
590         int JavadocDuplicateThrowsClassName = Javadoc + Internal + 480;
591         /** @since 3.0 */
592         int JavadocInvalidThrowsClassName = Javadoc + Internal + 481;
593         /** @since 3.0 */
594         int JavadocMissingSeeReference = Javadoc + Internal + 482;
595         /** @since 3.0 */
596         int JavadocInvalidSeeReference = Javadoc + Internal + 483;
597         /** @since 3.0 */
598         int JavadocInvalidSeeHref = Javadoc + Internal + 484;
599         /** @since 3.0 */
600         int JavadocInvalidSeeArgs = Javadoc + Internal + 485;
601         /** @since 3.0 */
602         int JavadocMissing = Javadoc + Internal + 486;
603         /** @since 3.0 */
604         int JavadocInvalidTag = Javadoc + Internal + 487;
605         /*
606          * ID for field errors in Javadoc
607          */
608         /** @since 3.0 */
609         int JavadocUndefinedField = Javadoc + Internal + 488;
610         /** @since 3.0 */
611         int JavadocNotVisibleField = Javadoc + Internal + 489;
612         /** @since 3.0 */
613         int JavadocAmbiguousField = Javadoc + Internal + 490;
614         /** @since 3.0 */
615         int JavadocUsingDeprecatedField = Javadoc + Internal + 491;
616         /*
617          * IDs for constructor errors in Javadoc
618          */
619         /** @since 3.0 */
620         int JavadocUndefinedConstructor = Javadoc + Internal + 492;
621         /** @since 3.0 */
622         int JavadocNotVisibleConstructor = Javadoc + Internal + 493;
623         /** @since 3.0 */
624         int JavadocAmbiguousConstructor = Javadoc + Internal + 494;
625         /** @since 3.0 */
626         int JavadocUsingDeprecatedConstructor = Javadoc + Internal + 495;
627         /*
628          * IDs for method errors in Javadoc
629          */
630         /** @since 3.0 */
631         int JavadocUndefinedMethod = Javadoc + Internal + 496;
632         /** @since 3.0 */
633         int JavadocNotVisibleMethod = Javadoc + Internal + 497;
634         /** @since 3.0 */
635         int JavadocAmbiguousMethod = Javadoc + Internal + 498;
636         /** @since 3.0 */
637         int JavadocUsingDeprecatedMethod = Javadoc + Internal + 499;
638         /** @since 3.0 */
639         int JavadocNoMessageSendOnBaseType = Javadoc + Internal + 500;
640         /** @since 3.0 */
641         int JavadocParameterMismatch = Javadoc + Internal + 501;
642         /** @since 3.0 */
643         int JavadocNoMessageSendOnArrayType = Javadoc + Internal + 502;
644         /*
645          * IDs for type errors in Javadoc
646          */
647         /** @since 3.0 */
648         int JavadocUndefinedType = Javadoc + Internal + 503;
649         /** @since 3.0 */
650         int JavadocNotVisibleType = Javadoc + Internal + 504;
651         /** @since 3.0 */
652         int JavadocAmbiguousType = Javadoc + Internal + 505;
653         /** @since 3.0 */
654         int JavadocUsingDeprecatedType = Javadoc + Internal + 506;
655         /** @since 3.0 */
656         int JavadocInternalTypeNameProvided = Javadoc + Internal + 507;
657         /** @since 3.0 */
658         int JavadocInheritedMethodHidesEnclosingName = Javadoc + Internal + 508;
659         /** @since 3.0 */
660         int JavadocInheritedFieldHidesEnclosingName = Javadoc + Internal + 509;
661         /** @since 3.0 */
662         int JavadocInheritedNameHidesEnclosingTypeName = Javadoc + Internal + 510;
663         /** @since 3.0 */
664         int JavadocAmbiguousMethodReference = Javadoc + Internal + 511;
665         /** @since 3.0 */
666         int JavadocUnterminatedInlineTag = Javadoc + Internal + 512;
667         /** @since 3.0 */
668         int JavadocMalformedSeeReference = Javadoc + Internal + 513;
669         /** @since 3.0 */
670         int JavadocMessagePrefix = Internal + 515;
671 }