|
Lines 113-118
Link Here
|
| 113 |
public static final String OPTION_ReportOverridingMethodWithoutSuperInvocation = "org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation"; //$NON-NLS-1$ |
113 |
public static final String OPTION_ReportOverridingMethodWithoutSuperInvocation = "org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation"; //$NON-NLS-1$ |
| 114 |
public static final String OPTION_GenerateClassFiles = "org.eclipse.jdt.core.compiler.generateClassFiles"; //$NON-NLS-1$ |
114 |
public static final String OPTION_GenerateClassFiles = "org.eclipse.jdt.core.compiler.generateClassFiles"; //$NON-NLS-1$ |
| 115 |
public static final String OPTION_Process_Annotations = "org.eclipse.jdt.core.compiler.processAnnotations"; //$NON-NLS-1$ |
115 |
public static final String OPTION_Process_Annotations = "org.eclipse.jdt.core.compiler.processAnnotations"; //$NON-NLS-1$ |
|
|
116 |
public static final String OPTION_ReportRedundantSuperInterface = "org.eclipse.jdt.core.compiler.problem.redundantInterface"; //$NON-NLS-1$ |
| 116 |
|
117 |
|
| 117 |
// Backward compatibility |
118 |
// Backward compatibility |
| 118 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
119 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
|
Lines 199-204
Link Here
|
| 199 |
public static final long OverridingMethodWithoutSuperInvocation = ASTNode.Bit50L; |
200 |
public static final long OverridingMethodWithoutSuperInvocation = ASTNode.Bit50L; |
| 200 |
public static final long PotentialNullReference = ASTNode.Bit51L; |
201 |
public static final long PotentialNullReference = ASTNode.Bit51L; |
| 201 |
public static final long RedundantNullCheck = ASTNode.Bit52L; |
202 |
public static final long RedundantNullCheck = ASTNode.Bit52L; |
|
|
203 |
public static final long RedundantInterface = ASTNode.Bit53L; |
| 202 |
|
204 |
|
| 203 |
// Map: String optionKey --> Long irritant> |
205 |
// Map: String optionKey --> Long irritant> |
| 204 |
private static Map OptionToIrritants; |
206 |
private static Map OptionToIrritants; |
|
Lines 434-439
Link Here
|
| 434 |
optionsMap.put(OPTION_ReportOverridingMethodWithoutSuperInvocation, getSeverityString(OverridingMethodWithoutSuperInvocation)); |
436 |
optionsMap.put(OPTION_ReportOverridingMethodWithoutSuperInvocation, getSeverityString(OverridingMethodWithoutSuperInvocation)); |
| 435 |
optionsMap.put(OPTION_GenerateClassFiles, this.generateClassFiles ? ENABLED : DISABLED); |
437 |
optionsMap.put(OPTION_GenerateClassFiles, this.generateClassFiles ? ENABLED : DISABLED); |
| 436 |
optionsMap.put(OPTION_Process_Annotations, this.processAnnotations ? ENABLED : DISABLED); |
438 |
optionsMap.put(OPTION_Process_Annotations, this.processAnnotations ? ENABLED : DISABLED); |
|
|
439 |
optionsMap.put(OPTION_ReportRedundantSuperInterface, getSeverityString(RedundantInterface)); |
| 437 |
return optionsMap; |
440 |
return optionsMap; |
| 438 |
} |
441 |
} |
| 439 |
|
442 |
|
|
Lines 556-561
Link Here
|
| 556 |
return OPTION_ReportFallthroughCase; |
559 |
return OPTION_ReportFallthroughCase; |
| 557 |
case (int)(OverridingMethodWithoutSuperInvocation >>> 32) : |
560 |
case (int)(OverridingMethodWithoutSuperInvocation >>> 32) : |
| 558 |
return OPTION_ReportOverridingMethodWithoutSuperInvocation; |
561 |
return OPTION_ReportOverridingMethodWithoutSuperInvocation; |
|
|
562 |
case (int)(RedundantInterface >>> 32) : |
| 563 |
return OPTION_ReportRedundantSuperInterface; |
| 559 |
} |
564 |
} |
| 560 |
} |
565 |
} |
| 561 |
return null; |
566 |
return null; |
|
Lines 823-828
Link Here
|
| 823 |
if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue); |
828 |
if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue); |
| 824 |
if ((optionValue = optionsMap.get(OPTION_ReportFallthroughCase)) != null) updateSeverity(FallthroughCase, optionValue); |
829 |
if ((optionValue = optionsMap.get(OPTION_ReportFallthroughCase)) != null) updateSeverity(FallthroughCase, optionValue); |
| 825 |
if ((optionValue = optionsMap.get(OPTION_ReportOverridingMethodWithoutSuperInvocation)) != null) updateSeverity(OverridingMethodWithoutSuperInvocation, optionValue); |
830 |
if ((optionValue = optionsMap.get(OPTION_ReportOverridingMethodWithoutSuperInvocation)) != null) updateSeverity(OverridingMethodWithoutSuperInvocation, optionValue); |
|
|
831 |
if ((optionValue = optionsMap.get(OPTION_ReportRedundantSuperInterface)) != null) updateSeverity(RedundantInterface, optionValue); |
| 826 |
|
832 |
|
| 827 |
// Javadoc options |
833 |
// Javadoc options |
| 828 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
834 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
|
Lines 1010-1015
Link Here
|
| 1010 |
buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ |
1016 |
buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ |
| 1011 |
buf.append("\n\t- generate class files: ").append(this.generateClassFiles ? ENABLED : DISABLED); //$NON-NLS-1$ |
1017 |
buf.append("\n\t- generate class files: ").append(this.generateClassFiles ? ENABLED : DISABLED); //$NON-NLS-1$ |
| 1012 |
buf.append("\n\t- process annotations: ").append(this.processAnnotations ? ENABLED : DISABLED); //$NON-NLS-1$ |
1018 |
buf.append("\n\t- process annotations: ").append(this.processAnnotations ? ENABLED : DISABLED); //$NON-NLS-1$ |
|
|
1019 |
buf.append("\n\t- redundant interface: ").append(getSeverityString(RedundantInterface)); //$NON-NLS-1$ |
| 1013 |
return buf.toString(); |
1020 |
return buf.toString(); |
| 1014 |
} |
1021 |
} |
| 1015 |
|
1022 |
|
|
Lines 1093-1099
Link Here
|
| 1093 |
/** |
1100 |
/** |
| 1094 |
* Return all warning option names for use as keys in compiler options maps. |
1101 |
* Return all warning option names for use as keys in compiler options maps. |
| 1095 |
* @return all warning option names |
1102 |
* @return all warning option names |
| 1096 |
* TODO (maxime) revise for ensuring completeness |
|
|
| 1097 |
*/ |
1103 |
*/ |
| 1098 |
public static String[] warningOptionNames() { |
1104 |
public static String[] warningOptionNames() { |
| 1099 |
String[] result = { |
1105 |
String[] result = { |
|
Lines 1101-1106
Link Here
|
| 1101 |
OPTION_ReportAssertIdentifier, |
1107 |
OPTION_ReportAssertIdentifier, |
| 1102 |
OPTION_ReportAutoboxing, |
1108 |
OPTION_ReportAutoboxing, |
| 1103 |
OPTION_ReportDeprecation, |
1109 |
OPTION_ReportDeprecation, |
|
|
1110 |
OPTION_ReportDeprecationInDeprecatedCode, |
| 1111 |
OPTION_ReportDeprecationWhenOverridingDeprecatedMethod, |
| 1104 |
OPTION_ReportDiscouragedReference, |
1112 |
OPTION_ReportDiscouragedReference, |
| 1105 |
OPTION_ReportEmptyStatement, |
1113 |
OPTION_ReportEmptyStatement, |
| 1106 |
OPTION_ReportEnumIdentifier, |
1114 |
OPTION_ReportEnumIdentifier, |
|
Lines 1113-1124
Link Here
|
| 1113 |
OPTION_ReportIncompatibleNonInheritedInterfaceMethod, |
1121 |
OPTION_ReportIncompatibleNonInheritedInterfaceMethod, |
| 1114 |
OPTION_ReportIncompleteEnumSwitch, |
1122 |
OPTION_ReportIncompleteEnumSwitch, |
| 1115 |
OPTION_ReportIndirectStaticAccess, |
1123 |
OPTION_ReportIndirectStaticAccess, |
|
|
1124 |
OPTION_ReportInvalidAnnotation, |
| 1116 |
OPTION_ReportInvalidJavadoc, |
1125 |
OPTION_ReportInvalidJavadoc, |
|
|
1126 |
OPTION_ReportInvalidJavadocTags, |
| 1127 |
OPTION_ReportInvalidJavadocTagsDeprecatedRef, |
| 1128 |
OPTION_ReportInvalidJavadocTagsNotVisibleRef, |
| 1129 |
OPTION_ReportInvalidJavadocTagsVisibility, |
| 1117 |
OPTION_ReportLocalVariableHiding, |
1130 |
OPTION_ReportLocalVariableHiding, |
| 1118 |
OPTION_ReportMethodWithConstructorName, |
1131 |
OPTION_ReportMethodWithConstructorName, |
|
|
1132 |
OPTION_ReportMissingAnnotation, |
| 1119 |
OPTION_ReportMissingDeprecatedAnnotation, |
1133 |
OPTION_ReportMissingDeprecatedAnnotation, |
|
|
1134 |
OPTION_ReportMissingJavadoc, |
| 1120 |
OPTION_ReportMissingJavadocComments, |
1135 |
OPTION_ReportMissingJavadocComments, |
|
|
1136 |
OPTION_ReportMissingJavadocCommentsOverriding, |
| 1137 |
OPTION_ReportMissingJavadocCommentsVisibility, |
| 1121 |
OPTION_ReportMissingJavadocTags, |
1138 |
OPTION_ReportMissingJavadocTags, |
|
|
1139 |
OPTION_ReportMissingJavadocTagsOverriding, |
| 1140 |
OPTION_ReportMissingJavadocTagsVisibility, |
| 1122 |
OPTION_ReportMissingOverrideAnnotation, |
1141 |
OPTION_ReportMissingOverrideAnnotation, |
| 1123 |
OPTION_ReportMissingSerialVersion, |
1142 |
OPTION_ReportMissingSerialVersion, |
| 1124 |
OPTION_ReportNoEffectAssignment, |
1143 |
OPTION_ReportNoEffectAssignment, |
|
Lines 1126-1151
Link Here
|
| 1126 |
OPTION_ReportNonExternalizedStringLiteral, |
1145 |
OPTION_ReportNonExternalizedStringLiteral, |
| 1127 |
OPTION_ReportNonStaticAccessToStatic, |
1146 |
OPTION_ReportNonStaticAccessToStatic, |
| 1128 |
OPTION_ReportNullReference, |
1147 |
OPTION_ReportNullReference, |
| 1129 |
OPTION_ReportPotentialNullReference, |
1148 |
OPTION_ReportOverridingMethodWithoutSuperInvocation, |
| 1130 |
OPTION_ReportRedundantNullCheck, |
|
|
| 1131 |
OPTION_ReportOverridingPackageDefaultMethod, |
1149 |
OPTION_ReportOverridingPackageDefaultMethod, |
| 1132 |
OPTION_ReportParameterAssignment, |
1150 |
OPTION_ReportParameterAssignment, |
| 1133 |
OPTION_ReportPossibleAccidentalBooleanAssignment, |
1151 |
OPTION_ReportPossibleAccidentalBooleanAssignment, |
|
|
1152 |
OPTION_ReportPotentialNullReference, |
| 1153 |
OPTION_ReportRawTypeReference, |
| 1154 |
OPTION_ReportRedundantNullCheck, |
| 1155 |
OPTION_ReportRedundantSuperInterface, |
| 1156 |
OPTION_ReportSpecialParameterHidingField, |
| 1134 |
OPTION_ReportSyntheticAccessEmulation, |
1157 |
OPTION_ReportSyntheticAccessEmulation, |
| 1135 |
OPTION_ReportTypeParameterHiding, |
1158 |
OPTION_ReportTypeParameterHiding, |
| 1136 |
OPTION_ReportUncheckedTypeOperation, |
1159 |
OPTION_ReportUncheckedTypeOperation, |
| 1137 |
OPTION_ReportUndocumentedEmptyBlock, |
1160 |
OPTION_ReportUndocumentedEmptyBlock, |
|
|
1161 |
OPTION_ReportUnhandledWarningToken, |
| 1138 |
OPTION_ReportUnnecessaryElse, |
1162 |
OPTION_ReportUnnecessaryElse, |
| 1139 |
OPTION_ReportUnnecessaryTypeCheck, |
1163 |
OPTION_ReportUnnecessaryTypeCheck, |
| 1140 |
OPTION_ReportUnqualifiedFieldAccess, |
1164 |
OPTION_ReportUnqualifiedFieldAccess, |
| 1141 |
OPTION_ReportUnusedDeclaredThrownException, |
1165 |
OPTION_ReportUnusedDeclaredThrownException, |
|
|
1166 |
OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding, |
| 1142 |
OPTION_ReportUnusedImport, |
1167 |
OPTION_ReportUnusedImport, |
|
|
1168 |
OPTION_ReportUnusedLabel, |
| 1143 |
OPTION_ReportUnusedLocal, |
1169 |
OPTION_ReportUnusedLocal, |
| 1144 |
OPTION_ReportUnusedParameter, |
1170 |
OPTION_ReportUnusedParameter, |
|
|
1171 |
OPTION_ReportUnusedParameterIncludeDocCommentReference, |
| 1172 |
OPTION_ReportUnusedParameterWhenImplementingAbstract, |
| 1173 |
OPTION_ReportUnusedParameterWhenOverridingConcrete, |
| 1145 |
OPTION_ReportUnusedPrivateMember, |
1174 |
OPTION_ReportUnusedPrivateMember, |
| 1146 |
OPTION_ReportVarargsArgumentNeedCast, |
1175 |
OPTION_ReportVarargsArgumentNeedCast, |
| 1147 |
OPTION_ReportUnhandledWarningToken, |
|
|
| 1148 |
OPTION_ReportOverridingMethodWithoutSuperInvocation |
| 1149 |
}; |
1176 |
}; |
| 1150 |
return result; |
1177 |
return result; |
| 1151 |
} |
1178 |
} |