5674266443a174169d9088094bf7429cc378df47
[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         
371         int UnmatchedBracket = Syntax + Internal + 220;
372         int NoFieldOnBaseType = FieldRelated + 221;
373         int InvalidExpressionAsStatement = Syntax + Internal + 222;
374         /** @since 2.1 */
375         int ExpressionShouldBeAVariable = Syntax + Internal + 223;
376         /** @since 2.1 */
377         int MissingSemiColon = Syntax + Internal + 224;
378         /** @since 2.1 */
379         int InvalidParenthesizedExpression = Syntax + Internal + 225;
380     
381         // scanner errors
382         int EndOfSource = Syntax + Internal + 250;
383         int InvalidHexa = Syntax + Internal + 251;
384         int InvalidOctal = Syntax + Internal + 252;
385         int InvalidCharacterConstant = Syntax + Internal + 253;
386         int InvalidEscape = Syntax + Internal + 254;
387         int InvalidInput = Syntax + Internal + 255;
388         int InvalidUnicodeEscape = Syntax + Internal + 256;
389         int InvalidFloat = Syntax + Internal + 257;
390         int NullSourceString = Syntax + Internal + 258;
391         int UnterminatedString = Syntax + Internal + 259;
392         int UnterminatedComment = Syntax + Internal + 260;
393
394         // type related problems
395         int InterfaceCannotHaveInitializers = TypeRelated + 300;
396         int DuplicateModifierForType = TypeRelated + 301;
397         int IllegalModifierForClass = TypeRelated + 302;
398         int IllegalModifierForInterface = TypeRelated + 303;
399         int IllegalModifierForMemberClass = TypeRelated + 304;
400         int IllegalModifierForMemberInterface = TypeRelated + 305;
401         int IllegalModifierForLocalClass = TypeRelated + 306;
402
403         int IllegalModifierCombinationFinalAbstractForClass = TypeRelated + 308;
404         int IllegalVisibilityModifierForInterfaceMemberType = TypeRelated + 309;
405         int IllegalVisibilityModifierCombinationForMemberType = TypeRelated + 310;
406         int IllegalStaticModifierForMemberType = TypeRelated + 311;
407         int SuperclassMustBeAClass = TypeRelated + 312;
408         int ClassExtendFinalClass = TypeRelated + 313;
409         int DuplicateSuperInterface = TypeRelated + 314;
410         int SuperInterfaceMustBeAnInterface = TypeRelated + 315;
411         int HierarchyCircularitySelfReference = TypeRelated + 316;
412         int HierarchyCircularity = TypeRelated + 317;
413         int HidingEnclosingType = TypeRelated + 318;
414         int DuplicateNestedType = TypeRelated + 319;
415         int CannotThrowType = TypeRelated + 320;
416         int PackageCollidesWithType = TypeRelated + 321;
417         int TypeCollidesWithPackage = TypeRelated + 322;
418         int DuplicateTypes = TypeRelated + 323;
419         int IsClassPathCorrect = TypeRelated + 324;
420         int PublicClassMustMatchFileName = TypeRelated + 325;
421         int MustSpecifyPackage = 326;
422         int HierarchyHasProblems = TypeRelated + 327;
423         int PackageIsNotExpectedPackage = 328;
424         /** @since 2.1 */
425         int ObjectCannotHaveSuperTypes = 329;
426
427         // int InvalidSuperclassBase = TypeRelated + 329; // reserved to 334 included
428         int SuperclassNotFound =  TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
429         int SuperclassNotVisible =  TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331
430         int SuperclassAmbiguous =  TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332
431         int SuperclassInternalNameProvided =  TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333
432         int SuperclassInheritedNameHidesEnclosingName =  TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334
433
434         // int InvalidInterfaceBase = TypeRelated + 334; // reserved to 339 included
435         int InterfaceNotFound =  TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335
436         int InterfaceNotVisible =  TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336
437         int InterfaceAmbiguous =  TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337
438         int InterfaceInternalNameProvided =  TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338
439         int InterfaceInheritedNameHidesEnclosingName =  TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339
440
441         // field related problems
442         int DuplicateField = FieldRelated + 340;
443         int DuplicateModifierForField = FieldRelated + 341;
444         int IllegalModifierForField = FieldRelated + 342;
445         int IllegalModifierForInterfaceField = FieldRelated + 343;
446         int IllegalVisibilityModifierCombinationForField = FieldRelated + 344;
447         int IllegalModifierCombinationFinalVolatileForField = FieldRelated + 345;
448         int UnexpectedStaticModifierForField = FieldRelated + 346;
449
450         // int FieldTypeProblemBase = FieldRelated + 349; //reserved to 354
451         int FieldTypeNotFound =  FieldRelated + 349 + ProblemReasons.NotFound; // FieldRelated + 350
452         int FieldTypeNotVisible =  FieldRelated + 349 + ProblemReasons.NotVisible; // FieldRelated + 351
453         int FieldTypeAmbiguous =  FieldRelated + 349 + ProblemReasons.Ambiguous; // FieldRelated + 352
454         int FieldTypeInternalNameProvided =  FieldRelated + 349 + ProblemReasons.InternalNameProvided; // FieldRelated + 353
455         int FieldTypeInheritedNameHidesEnclosingName =  FieldRelated + 349 + ProblemReasons.InheritedNameHidesEnclosingName; // FieldRelated + 354
456         
457         // method related problems
458         int DuplicateMethod = MethodRelated + 355;
459         int IllegalModifierForArgument = MethodRelated + 356;
460         int DuplicateModifierForMethod = MethodRelated + 357;
461         int IllegalModifierForMethod = MethodRelated + 358;
462         int IllegalModifierForInterfaceMethod = MethodRelated + 359;
463         int IllegalVisibilityModifierCombinationForMethod = MethodRelated + 360;
464         int UnexpectedStaticModifierForMethod = MethodRelated + 361;
465         int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362;
466         int AbstractMethodInAbstractClass = MethodRelated + 363;
467         int ArgumentTypeCannotBeVoid = MethodRelated + 364;
468         int ArgumentTypeCannotBeVoidArray = MethodRelated + 365;
469         int ReturnTypeCannotBeVoidArray = MethodRelated + 366;
470         int NativeMethodsCannotBeStrictfp = MethodRelated + 367;
471         int DuplicateModifierForArgument = MethodRelated + 368;
472
473         //      int ArgumentProblemBase = MethodRelated + 369; // reserved to 374 included.
474         int ArgumentTypeNotFound =  MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370
475         int ArgumentTypeNotVisible =  MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371
476         int ArgumentTypeAmbiguous =  MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372
477         int ArgumentTypeInternalNameProvided =  MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373
478         int ArgumentTypeInheritedNameHidesEnclosingName =  MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374
479
480         //      int ExceptionTypeProblemBase = MethodRelated + 374; // reserved to 379 included.
481         int ExceptionTypeNotFound =  MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375
482         int ExceptionTypeNotVisible =  MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376
483         int ExceptionTypeAmbiguous =  MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377
484         int ExceptionTypeInternalNameProvided =  MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378
485         int ExceptionTypeInheritedNameHidesEnclosingName =  MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379
486
487         //      int ReturnTypeProblemBase = MethodRelated + 379;
488         int ReturnTypeNotFound =  MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380
489         int ReturnTypeNotVisible =  MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381
490         int ReturnTypeAmbiguous =  MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382
491         int ReturnTypeInternalNameProvided =  MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383
492         int ReturnTypeInheritedNameHidesEnclosingName =  MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384
493
494         // import related problems
495         int ConflictingImport = ImportRelated + 385;
496         int DuplicateImport = ImportRelated + 386;
497         int CannotImportPackage = ImportRelated + 387;
498         int UnusedImport = ImportRelated + 388;
499
500         //      int ImportProblemBase = ImportRelated + 389;
501         int ImportNotFound =  ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390
502         int ImportNotVisible =  ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391
503         int ImportAmbiguous =  ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392
504         int ImportInternalNameProvided =  ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393
505         int ImportInheritedNameHidesEnclosingName =  ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394
506
507         
508         // local variable related problems
509         int DuplicateModifierForVariable = MethodRelated + 395;
510         int IllegalModifierForVariable = MethodRelated + 396;
511
512         // method verifier problems
513         int AbstractMethodMustBeImplemented = MethodRelated + 400;
514         int FinalMethodCannotBeOverridden = MethodRelated + 401;
515         int IncompatibleExceptionInThrowsClause = MethodRelated + 402;
516         int IncompatibleExceptionInInheritedMethodThrowsClause = MethodRelated + 403;
517         int IncompatibleReturnType = MethodRelated + 404;
518         int InheritedMethodReducesVisibility = MethodRelated + 405;
519         int CannotOverrideAStaticMethodWithAnInstanceMethod = MethodRelated + 406;
520         int CannotHideAnInstanceMethodWithAStaticMethod = MethodRelated + 407;
521         int StaticInheritedMethodConflicts = MethodRelated + 408;
522         int MethodReducesVisibility = MethodRelated + 409;
523         int OverridingNonVisibleMethod = MethodRelated + 410;
524         int AbstractMethodCannotBeOverridden = MethodRelated + 411;
525         int OverridingDeprecatedMethod = MethodRelated + 412;
526         /** @since 2.1 */
527         int IncompatibleReturnTypeForNonInheritedInterfaceMethod = MethodRelated + 413;
528         /** @since 2.1 */
529         int IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod = MethodRelated + 414;
530         
531         // code snippet support
532         int CodeSnippetMissingClass = Internal + 420;
533         int CodeSnippetMissingMethod = Internal + 421;
534         int NonExternalizedStringLiteral = Internal + 261;
535         int CannotUseSuperInCodeSnippet = Internal + 422;
536         
537         //constant pool
538         int TooManyConstantsInConstantPool = Internal + 430;
539         /** @since 2.1 */
540         int TooManyBytesForStringConstant = Internal + 431;
541
542         // static constraints
543         /** @since 2.1 */
544         int TooManyFields = Internal + 432;
545         /** @since 2.1 */
546         int TooManyMethods = Internal + 433; 
547                 
548         // 1.4 features
549         // assertion warning
550         int UseAssertAsAnIdentifier = Internal + 440;
551         
552         // detected task
553         /** @since 2.1 */
554         int Task = Internal + 450;
555 }