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