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