d8be3693b7daae601e0e76c1d72c803b01e52163
[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         /**
164          * Mask to use in order to filter out the category portion of the problem ID.
165          */
166         int IgnoreCategoriesMask = 0xFFFFFF;
167
168         /**
169          * Below are listed all available problem IDs. Note that this list could be augmented in the future, 
170          * as new features are added to the Java core implementation.
171          */
172
173         /**
174          * ID reserved for referencing an internal error inside the JavaCore implementation which
175          * may be surfaced as a problem associated with the compilation unit which caused it to occur.
176          */
177         int Unclassified = 0;
178
179         /**
180          * Generic type related problems
181          */
182         int ObjectHasNoSuperclass = TypeRelated + 1;
183         int UndefinedType = TypeRelated + 2;
184         int NotVisibleType = TypeRelated + 3;
185         int AmbiguousType = TypeRelated + 4;
186         int UsingDeprecatedType = TypeRelated + 5;
187         int InternalTypeNameProvided = TypeRelated + 6;
188         /** @since 2.1 */
189         int UnusedPrivateType = Internal + TypeRelated + 7;
190         
191         int IncompatibleTypesInEqualityOperator = TypeRelated + 15;
192         int IncompatibleTypesInConditionalOperator = TypeRelated + 16;
193         int TypeMismatch = TypeRelated + 17;
194
195         /**
196          * Inner types related problems
197          */
198         int MissingEnclosingInstanceForConstructorCall = TypeRelated + 20;
199         int MissingEnclosingInstance = TypeRelated + 21;
200         int IncorrectEnclosingInstanceReference = TypeRelated + 22;
201         int IllegalEnclosingInstanceSpecification = TypeRelated + 23; 
202         int CannotDefineStaticInitializerInLocalType = Internal + 24;
203         int OuterLocalMustBeFinal = Internal + 25;
204         int CannotDefineInterfaceInLocalType = Internal + 26;
205         int IllegalPrimitiveOrArrayTypeForEnclosingInstance = TypeRelated + 27;
206         /** @since 2.1 */
207         int EnclosingInstanceInConstructorCall = Internal + 28;
208         int AnonymousClassCannotExtendFinalClass = TypeRelated + 29;
209
210         // variables
211         int UndefinedName = 50;
212         int UninitializedLocalVariable = Internal + 51;
213         int VariableTypeCannotBeVoid = Internal + 52;
214         int VariableTypeCannotBeVoidArray = Internal + 53;
215         int CannotAllocateVoidArray = Internal + 54;
216         // local variables
217         int RedefinedLocal = Internal + 55;
218         int RedefinedArgument = Internal + 56;
219         // final local variables
220         int DuplicateFinalLocalInitialization = Internal + 57;
221         /** @since 2.1 */
222         int NonBlankFinalLocalAssignment = Internal + 58;
223         int FinalOuterLocalAssignment = Internal + 60;
224         int LocalVariableIsNeverUsed = Internal + 61;
225         int ArgumentIsNeverUsed = Internal + 62;
226         int BytecodeExceeds64KLimit = Internal + 63;
227         int BytecodeExceeds64KLimitForClinit = Internal + 64;
228         int TooManyArgumentSlots = Internal + 65;
229         int TooManyLocalVariableSlots = Internal + 66;
230         /** @since 2.1 */
231         int TooManySyntheticArgumentSlots = Internal + 67;
232         /** @since 2.1 */
233         int TooManyArrayDimensions = Internal + 68;
234         /** @since 2.1 */
235         int BytecodeExceeds64KLimitForConstructor = Internal + 69;
236
237         // fields
238         int UndefinedField = FieldRelated + 70;
239         int NotVisibleField = FieldRelated + 71;
240         int AmbiguousField = FieldRelated + 72;
241         int UsingDeprecatedField = FieldRelated + 73;
242         int NonStaticFieldFromStaticInvocation = FieldRelated + 74;
243         int ReferenceToForwardField = FieldRelated + Internal + 75;
244         /** @since 2.1 */
245         int NonStaticAccessToStaticField = Internal + FieldRelated + 76;
246         /** @since 2.1 */
247         int UnusedPrivateField = Internal + FieldRelated + 77;
248         
249         // blank final fields
250         int FinalFieldAssignment = FieldRelated + 80;
251         int UninitializedBlankFinalField = FieldRelated + 81;
252         int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
253
254         // methods
255         int UndefinedMethod = MethodRelated + 100;
256         int NotVisibleMethod = MethodRelated + 101;
257         int AmbiguousMethod = MethodRelated + 102;
258         int UsingDeprecatedMethod = MethodRelated + 103;
259         int DirectInvocationOfAbstractMethod = MethodRelated + 104;
260         int VoidMethodReturnsValue = MethodRelated + 105;
261         int MethodReturnsVoid = MethodRelated + 106;
262         int MethodRequiresBody = Internal + MethodRelated + 107;
263         int ShouldReturnValue = Internal + MethodRelated + 108;
264         int MethodButWithConstructorName = MethodRelated + 110;
265         int MissingReturnType = TypeRelated + 111;
266         int BodyForNativeMethod = Internal + MethodRelated + 112;
267         int BodyForAbstractMethod = Internal + MethodRelated + 113;
268         int NoMessageSendOnBaseType = MethodRelated + 114;
269         int ParameterMismatch = MethodRelated + 115;
270         int NoMessageSendOnArrayType = MethodRelated + 116;
271         /** @since 2.1 */
272     int NonStaticAccessToStaticMethod = Internal + MethodRelated + 117;
273         /** @since 2.1 */
274         int UnusedPrivateMethod = Internal + MethodRelated + 118;
275             
276         // constructors
277         int UndefinedConstructor = ConstructorRelated + 130;
278         int NotVisibleConstructor = ConstructorRelated + 131;
279         int AmbiguousConstructor = ConstructorRelated + 132;
280         int UsingDeprecatedConstructor = ConstructorRelated + 133;
281         /** @since 2.1 */
282         int UnusedPrivateConstructor = Internal + MethodRelated + 134;
283         // explicit constructor calls
284         int InstanceFieldDuringConstructorInvocation = ConstructorRelated + 135;
285         int InstanceMethodDuringConstructorInvocation = ConstructorRelated + 136;
286         int RecursiveConstructorInvocation = ConstructorRelated + 137;
287         int ThisSuperDuringConstructorInvocation = ConstructorRelated + 138;
288         // implicit constructor calls
289         int UndefinedConstructorInDefaultConstructor = ConstructorRelated + 140;
290         int NotVisibleConstructorInDefaultConstructor = ConstructorRelated + 141;
291         int AmbiguousConstructorInDefaultConstructor = ConstructorRelated + 142;
292         int UndefinedConstructorInImplicitConstructorCall = ConstructorRelated + 143;
293         int NotVisibleConstructorInImplicitConstructorCall = ConstructorRelated + 144;
294         int AmbiguousConstructorInImplicitConstructorCall = ConstructorRelated + 145;
295         int UnhandledExceptionInDefaultConstructor = TypeRelated + 146;
296         int UnhandledExceptionInImplicitConstructorCall = TypeRelated + 147;
297                                 
298         // expressions
299         int ArrayReferenceRequired = Internal + 150;
300         int NoImplicitStringConversionForCharArrayExpression = Internal + 151;
301         // constant expressions
302         int StringConstantIsExceedingUtf8Limit = Internal + 152;
303         int NonConstantExpression = 153;
304         int NumericValueOutOfRange = Internal + 154;
305         // cast expressions
306         int IllegalCast = TypeRelated + 156;
307         // allocations
308         int InvalidClassInstantiation = TypeRelated + 157;
309         int CannotDefineDimensionExpressionsWithInit = Internal + 158;
310         int MustDefineEitherDimensionExpressionsOrInitializer = Internal + 159;
311         // operators
312         int InvalidOperator = Internal + 160;
313         // statements
314         int CodeCannotBeReached = Internal + 161;
315         int CannotReturnInInitializer = Internal + 162;
316         int InitializerMustCompleteNormally = Internal + 163;
317         
318         // assert
319         int InvalidVoidExpression = Internal + 164;
320         // try
321         int MaskedCatch = TypeRelated + 165;
322         int DuplicateDefaultCase = 166;
323         int UnreachableCatch = TypeRelated + MethodRelated + 167;
324         int UnhandledException = TypeRelated + 168;
325         // switch       
326         int IncorrectSwitchType = TypeRelated + 169;
327         int DuplicateCase = FieldRelated + 170;
328         // labelled
329         int DuplicateLabel = Internal + 171;
330         int InvalidBreak = Internal + 172;
331         int InvalidContinue = Internal + 173;
332         int UndefinedLabel = Internal + 174;
333         //synchronized
334         int InvalidTypeToSynchronized = Internal + 175;
335         int InvalidNullToSynchronized = Internal + 176;
336         // throw
337         int CannotThrowNull = Internal + 177;
338         // assignment
339         /** @since 2.1 */
340         int AssignmentHasNoEffect = Internal + 178;
341         
342         // inner emulation
343         int NeedToEmulateFieldReadAccess = FieldRelated + 190;
344         int NeedToEmulateFieldWriteAccess = FieldRelated + 191;
345         int NeedToEmulateMethodAccess = MethodRelated + 192;
346         int NeedToEmulateConstructorAccess = MethodRelated + 193;
347
348         //inherited name hides enclosing name (sort of ambiguous)
349         int InheritedMethodHidesEnclosingName = MethodRelated + 195;
350         int InheritedFieldHidesEnclosingName = FieldRelated + 196;
351         int InheritedTypeHidesEnclosingName = TypeRelated + 197;
352
353         // miscellaneous
354         int ThisInStaticContext = Internal + 200;
355         int StaticMethodRequested = Internal + MethodRelated + 201;
356         int IllegalDimension = Internal + 202;
357         int InvalidTypeExpression = Internal + 203;
358         int ParsingError = Syntax + Internal + 204;
359         int ParsingErrorNoSuggestion = Syntax + Internal + 205;
360         int InvalidUnaryExpression = Syntax + Internal + 206;
361
362         // syntax errors
363         int InterfaceCannotHaveConstructors = Syntax + Internal + 207;
364         int ArrayConstantsOnlyInArrayInitializers = Syntax + Internal + 208;
365         int ParsingErrorOnKeyword = Syntax + Internal + 209;    
366         int ParsingErrorOnKeywordNoSuggestion = Syntax + Internal + 210;
367         int PHPParsingError = Syntax + Internal + 211;
368         int PHPParsingWarning = Syntax + Internal + 212;
369         int PHPVarDeprecatedWarning = Syntax + Internal + 213;
370         int PHPBadStyleKeywordWarning = Syntax + Internal + 214;
371         int PHPBadStyleUppercaseIdentifierWarning = Syntax + Internal + 215;
372         
373         int UnmatchedBracket = Syntax + Internal + 220;
374         int NoFieldOnBaseType = FieldRelated + 221;
375         int InvalidExpressionAsStatement = Syntax + Internal + 222;
376         /** @since 2.1 */
377         int ExpressionShouldBeAVariable = Syntax + Internal + 223;
378         /** @since 2.1 */
379         int MissingSemiColon = Syntax + Internal + 224;
380         /** @since 2.1 */
381         int InvalidParenthesizedExpression = Syntax + Internal + 225;
382     
383         // scanner errors
384         int EndOfSource = Syntax + Internal + 250;
385         int InvalidHexa = Syntax + Internal + 251;
386         int InvalidOctal = Syntax + Internal + 252;
387         int InvalidCharacterConstant = Syntax + Internal + 253;
388         int InvalidEscape = Syntax + Internal + 254;
389         int InvalidInput = Syntax + Internal + 255;
390         int InvalidUnicodeEscape = Syntax + Internal + 256;
391         int InvalidFloat = Syntax + Internal + 257;
392         int NullSourceString = Syntax + Internal + 258;
393         int UnterminatedString = Syntax + Internal + 259;
394         int UnterminatedComment = Syntax + Internal + 260;
395
396         // type related problems
397         int InterfaceCannotHaveInitializers = TypeRelated + 300;
398         int DuplicateModifierForType = TypeRelated + 301;
399         int IllegalModifierForClass = TypeRelated + 302;
400         int IllegalModifierForInterface = TypeRelated + 303;
401         int IllegalModifierForMemberClass = TypeRelated + 304;
402         int IllegalModifierForMemberInterface = TypeRelated + 305;
403         int IllegalModifierForLocalClass = TypeRelated + 306;
404
405         int IllegalModifierCombinationFinalAbstractForClass = TypeRelated + 308;
406         int IllegalVisibilityModifierForInterfaceMemberType = TypeRelated + 309;
407         int IllegalVisibilityModifierCombinationForMemberType = TypeRelated + 310;
408         int IllegalStaticModifierForMemberType = TypeRelated + 311;
409         int SuperclassMustBeAClass = TypeRelated + 312;
410         int ClassExtendFinalClass = TypeRelated + 313;
411         int DuplicateSuperInterface = TypeRelated + 314;
412         int SuperInterfaceMustBeAnInterface = TypeRelated + 315;
413         int HierarchyCircularitySelfReference = TypeRelated + 316;
414         int HierarchyCircularity = TypeRelated + 317;
415         int HidingEnclosingType = TypeRelated + 318;
416         int DuplicateNestedType = TypeRelated + 319;
417         int CannotThrowType = TypeRelated + 320;
418         int PackageCollidesWithType = TypeRelated + 321;
419         int TypeCollidesWithPackage = TypeRelated + 322;
420         int DuplicateTypes = TypeRelated + 323;
421         int IsClassPathCorrect = TypeRelated + 324;
422         int PublicClassMustMatchFileName = TypeRelated + 325;
423         int MustSpecifyPackage = 326;
424         int HierarchyHasProblems = TypeRelated + 327;
425         int PackageIsNotExpectedPackage = 328;
426         /** @since 2.1 */
427         int ObjectCannotHaveSuperTypes = 329;
428
429         // int InvalidSuperclassBase = TypeRelated + 329; // reserved to 334 included
430         int SuperclassNotFound =  TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
431         int SuperclassNotVisible =  TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331
432         int SuperclassAmbiguous =  TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332
433         int SuperclassInternalNameProvided =  TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333
434         int SuperclassInheritedNameHidesEnclosingName =  TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334
435
436         // int InvalidInterfaceBase = TypeRelated + 334; // reserved to 339 included
437         int InterfaceNotFound =  TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335
438         int InterfaceNotVisible =  TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336
439         int InterfaceAmbiguous =  TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337
440         int InterfaceInternalNameProvided =  TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338
441         int InterfaceInheritedNameHidesEnclosingName =  TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339
442
443         // field related problems
444         int DuplicateField = FieldRelated + 340;
445         int DuplicateModifierForField = FieldRelated + 341;
446         int IllegalModifierForField = FieldRelated + 342;
447         int IllegalModifierForInterfaceField = FieldRelated + 343;
448         int IllegalVisibilityModifierCombinationForField = FieldRelated + 344;
449         int IllegalModifierCombinationFinalVolatileForField = FieldRelated + 345;
450         int UnexpectedStaticModifierForField = FieldRelated + 346;
451
452         // int FieldTypeProblemBase = FieldRelated + 349; //reserved to 354
453         int FieldTypeNotFound =  FieldRelated + 349 + ProblemReasons.NotFound; // FieldRelated + 350
454         int FieldTypeNotVisible =  FieldRelated + 349 + ProblemReasons.NotVisible; // FieldRelated + 351
455         int FieldTypeAmbiguous =  FieldRelated + 349 + ProblemReasons.Ambiguous; // FieldRelated + 352
456         int FieldTypeInternalNameProvided =  FieldRelated + 349 + ProblemReasons.InternalNameProvided; // FieldRelated + 353
457         int FieldTypeInheritedNameHidesEnclosingName =  FieldRelated + 349 + ProblemReasons.InheritedNameHidesEnclosingName; // FieldRelated + 354
458         
459         // method related problems
460         int DuplicateMethod = MethodRelated + 355;
461         int IllegalModifierForArgument = MethodRelated + 356;
462         int DuplicateModifierForMethod = MethodRelated + 357;
463         int IllegalModifierForMethod = MethodRelated + 358;
464         int IllegalModifierForInterfaceMethod = MethodRelated + 359;
465         int IllegalVisibilityModifierCombinationForMethod = MethodRelated + 360;
466         int UnexpectedStaticModifierForMethod = MethodRelated + 361;
467         int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362;
468         int AbstractMethodInAbstractClass = MethodRelated + 363;
469         int ArgumentTypeCannotBeVoid = MethodRelated + 364;
470         int ArgumentTypeCannotBeVoidArray = MethodRelated + 365;
471         int ReturnTypeCannotBeVoidArray = MethodRelated + 366;
472         int NativeMethodsCannotBeStrictfp = MethodRelated + 367;
473         int DuplicateModifierForArgument = MethodRelated + 368;
474
475         //      int ArgumentProblemBase = MethodRelated + 369; // reserved to 374 included.
476         int ArgumentTypeNotFound =  MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370
477         int ArgumentTypeNotVisible =  MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371
478         int ArgumentTypeAmbiguous =  MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372
479         int ArgumentTypeInternalNameProvided =  MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373
480         int ArgumentTypeInheritedNameHidesEnclosingName =  MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374
481
482         //      int ExceptionTypeProblemBase = MethodRelated + 374; // reserved to 379 included.
483         int ExceptionTypeNotFound =  MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375
484         int ExceptionTypeNotVisible =  MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376
485         int ExceptionTypeAmbiguous =  MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377
486         int ExceptionTypeInternalNameProvided =  MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378
487         int ExceptionTypeInheritedNameHidesEnclosingName =  MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379
488
489         //      int ReturnTypeProblemBase = MethodRelated + 379;
490         int ReturnTypeNotFound =  MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380
491         int ReturnTypeNotVisible =  MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381
492         int ReturnTypeAmbiguous =  MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382
493         int ReturnTypeInternalNameProvided =  MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383
494         int ReturnTypeInheritedNameHidesEnclosingName =  MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384
495
496         // import related problems
497         int ConflictingImport = ImportRelated + 385;
498         int DuplicateImport = ImportRelated + 386;
499         int CannotImportPackage = ImportRelated + 387;
500         int UnusedImport = ImportRelated + 388;
501
502         //      int ImportProblemBase = ImportRelated + 389;
503         int ImportNotFound =  ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390
504         int ImportNotVisible =  ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391
505         int ImportAmbiguous =  ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392
506         int ImportInternalNameProvided =  ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393
507         int ImportInheritedNameHidesEnclosingName =  ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394
508
509         
510         // local variable related problems
511         int DuplicateModifierForVariable = MethodRelated + 395;
512         int IllegalModifierForVariable = MethodRelated + 396;
513
514         // method verifier problems
515         int AbstractMethodMustBeImplemented = MethodRelated + 400;
516         int FinalMethodCannotBeOverridden = MethodRelated + 401;
517         int IncompatibleExceptionInThrowsClause = MethodRelated + 402;
518         int IncompatibleExceptionInInheritedMethodThrowsClause = MethodRelated + 403;
519         int IncompatibleReturnType = MethodRelated + 404;
520         int InheritedMethodReducesVisibility = MethodRelated + 405;
521         int CannotOverrideAStaticMethodWithAnInstanceMethod = MethodRelated + 406;
522         int CannotHideAnInstanceMethodWithAStaticMethod = MethodRelated + 407;
523         int StaticInheritedMethodConflicts = MethodRelated + 408;
524         int MethodReducesVisibility = MethodRelated + 409;
525         int OverridingNonVisibleMethod = MethodRelated + 410;
526         int AbstractMethodCannotBeOverridden = MethodRelated + 411;
527         int OverridingDeprecatedMethod = MethodRelated + 412;
528         /** @since 2.1 */
529         int IncompatibleReturnTypeForNonInheritedInterfaceMethod = MethodRelated + 413;
530         /** @since 2.1 */
531         int IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod = MethodRelated + 414;
532         
533         // code snippet support
534         int CodeSnippetMissingClass = Internal + 420;
535         int CodeSnippetMissingMethod = Internal + 421;
536         int NonExternalizedStringLiteral = Internal + 261;
537         int CannotUseSuperInCodeSnippet = Internal + 422;
538         
539         //constant pool
540         int TooManyConstantsInConstantPool = Internal + 430;
541         /** @since 2.1 */
542         int TooManyBytesForStringConstant = Internal + 431;
543
544         // static constraints
545         /** @since 2.1 */
546         int TooManyFields = Internal + 432;
547         /** @since 2.1 */
548         int TooManyMethods = Internal + 433; 
549                 
550         // 1.4 features
551         // assertion warning
552         int UseAssertAsAnIdentifier = Internal + 440;
553         
554         // detected task
555         /** @since 2.1 */
556         int Task = Internal + 450;
557 }