Lines 104-109
Link Here
|
104 |
public static final String OPTION_ReportUnusedLabel = "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$ |
104 |
public static final String OPTION_ReportUnusedLabel = "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$ |
105 |
public static final String OPTION_FatalOptionalError = "org.eclipse.jdt.core.compiler.problem.fatalOptionalError"; //$NON-NLS-1$ |
105 |
public static final String OPTION_FatalOptionalError = "org.eclipse.jdt.core.compiler.problem.fatalOptionalError"; //$NON-NLS-1$ |
106 |
public static final String OPTION_ReportParameterAssignment = "org.eclipse.jdt.core.compiler.problem.parameterAssignment"; //$NON-NLS-1$ |
106 |
public static final String OPTION_ReportParameterAssignment = "org.eclipse.jdt.core.compiler.problem.parameterAssignment"; //$NON-NLS-1$ |
|
|
107 |
public static final String OPTION_ReportFallthroughCase = "org.eclipse.jdt.core.compiler.problem.fallthroughCase"; //$NON-NLS-1$ |
107 |
|
108 |
|
108 |
// Backward compatibility |
109 |
// Backward compatibility |
109 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
110 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
Lines 187-192
Link Here
|
187 |
public static final long RawTypeReference = ASTNode.Bit46L; |
188 |
public static final long RawTypeReference = ASTNode.Bit46L; |
188 |
public static final long UnusedLabel = ASTNode.Bit47L; |
189 |
public static final long UnusedLabel = ASTNode.Bit47L; |
189 |
public static final long ParameterAssignment = ASTNode.Bit48L; |
190 |
public static final long ParameterAssignment = ASTNode.Bit48L; |
|
|
191 |
public static final long FallthroughCase = ASTNode.Bit49L; |
190 |
|
192 |
|
191 |
// Default severity level for handlers |
193 |
// Default severity level for handlers |
192 |
public long errorThreshold = 0; |
194 |
public long errorThreshold = 0; |
Lines 381-387
Link Here
|
381 |
optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); |
383 |
optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); |
382 |
optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK)); |
384 |
optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK)); |
383 |
optionsMap.put(OPTION_FatalOptionalError, this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); |
385 |
optionsMap.put(OPTION_FatalOptionalError, this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); |
384 |
|
|
|
385 |
if (this.defaultEncoding != null) { |
386 |
if (this.defaultEncoding != null) { |
386 |
optionsMap.put(OPTION_Encoding, this.defaultEncoding); |
387 |
optionsMap.put(OPTION_Encoding, this.defaultEncoding); |
387 |
} |
388 |
} |
Lines 397-402
Link Here
|
397 |
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); |
398 |
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); |
398 |
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); |
399 |
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); |
399 |
optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment)); |
400 |
optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment)); |
|
|
401 |
optionsMap.put(OPTION_ReportFallthroughCase, getSeverityString(FallthroughCase)); |
400 |
return optionsMap; |
402 |
return optionsMap; |
401 |
} |
403 |
} |
402 |
|
404 |
|
Lines 638-643
Link Here
|
638 |
if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue); |
640 |
if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue); |
639 |
if ((optionValue = optionsMap.get(OPTION_ReportUnusedLabel)) != null) updateSeverity(UnusedLabel, optionValue); |
641 |
if ((optionValue = optionsMap.get(OPTION_ReportUnusedLabel)) != null) updateSeverity(UnusedLabel, optionValue); |
640 |
if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue); |
642 |
if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue); |
|
|
643 |
if ((optionValue = optionsMap.get(OPTION_ReportFallthroughCase)) != null) updateSeverity(FallthroughCase, optionValue); |
641 |
|
644 |
|
642 |
// Javadoc options |
645 |
// Javadoc options |
643 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
646 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
Lines 867-872
Link Here
|
867 |
OPTION_ReportDiscouragedReference, |
870 |
OPTION_ReportDiscouragedReference, |
868 |
OPTION_ReportEmptyStatement, |
871 |
OPTION_ReportEmptyStatement, |
869 |
OPTION_ReportEnumIdentifier, |
872 |
OPTION_ReportEnumIdentifier, |
|
|
873 |
OPTION_ReportFallthroughCase, |
870 |
OPTION_ReportFieldHiding, |
874 |
OPTION_ReportFieldHiding, |
871 |
OPTION_ReportFinalParameterBound, |
875 |
OPTION_ReportFinalParameterBound, |
872 |
OPTION_ReportFinallyBlockNotCompletingNormally, |
876 |
OPTION_ReportFinallyBlockNotCompletingNormally, |
Lines 962-967
Link Here
|
962 |
return "restriction"; //$NON-NLS-1$ |
966 |
return "restriction"; //$NON-NLS-1$ |
963 |
case (int) (NullReference >>> 32) : |
967 |
case (int) (NullReference >>> 32) : |
964 |
return "null"; //$NON-NLS-1$ |
968 |
return "null"; //$NON-NLS-1$ |
|
|
969 |
case (int) (FallthroughCase >>> 32) : |
970 |
return "fallthrough"; //$NON-NLS-1$ |
965 |
} |
971 |
} |
966 |
} |
972 |
} |
967 |
return null; |
973 |
return null; |
Lines 972-977
Link Here
|
972 |
"boxing", //$NON-NLS-1$ |
978 |
"boxing", //$NON-NLS-1$ |
973 |
"dep-ann", //$NON-NLS-1$ |
979 |
"dep-ann", //$NON-NLS-1$ |
974 |
"deprecation", //$NON-NLS-1$ |
980 |
"deprecation", //$NON-NLS-1$ |
|
|
981 |
"fall-through", //$NON-NLS-1$ |
975 |
"finally", //$NON-NLS-1$ |
982 |
"finally", //$NON-NLS-1$ |
976 |
"hiding", //$NON-NLS-1$ |
983 |
"hiding", //$NON-NLS-1$ |
977 |
"incomplete-switch", //$NON-NLS-1$ |
984 |
"incomplete-switch", //$NON-NLS-1$ |
Lines 1004-1009
Link Here
|
1004 |
return MissingDeprecatedAnnotation; |
1011 |
return MissingDeprecatedAnnotation; |
1005 |
break; |
1012 |
break; |
1006 |
case 'f' : |
1013 |
case 'f' : |
|
|
1014 |
if ("fallthrough".equals(warningToken)) //$NON-NLS-1$ |
1015 |
return FallthroughCase; |
1007 |
if ("finally".equals(warningToken)) //$NON-NLS-1$ |
1016 |
if ("finally".equals(warningToken)) //$NON-NLS-1$ |
1008 |
return FinallyBlockNotCompleting; |
1017 |
return FinallyBlockNotCompleting; |
1009 |
break; |
1018 |
break; |