Lines 103-108
Link Here
|
103 |
public static final String OPTION_ReportUnhandledWarningToken = "org.eclipse.jdt.core.compiler.problem.unhandledWarningToken"; //$NON-NLS-1$ |
103 |
public static final String OPTION_ReportUnhandledWarningToken = "org.eclipse.jdt.core.compiler.problem.unhandledWarningToken"; //$NON-NLS-1$ |
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 |
|
107 |
|
107 |
// Backward compatibility |
108 |
// Backward compatibility |
108 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
109 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
Lines 185-190
Link Here
|
185 |
public static final long UnhandledWarningToken = ASTNode.Bit45L; |
186 |
public static final long UnhandledWarningToken = ASTNode.Bit45L; |
186 |
public static final long RawTypeReference = ASTNode.Bit46L; |
187 |
public static final long RawTypeReference = ASTNode.Bit46L; |
187 |
public static final long UnusedLabel = ASTNode.Bit47L; |
188 |
public static final long UnusedLabel = ASTNode.Bit47L; |
|
|
189 |
public static final long ParameterAssignment = ASTNode.Bit48L; |
188 |
|
190 |
|
189 |
// Default severity level for handlers |
191 |
// Default severity level for handlers |
190 |
public long errorThreshold = 0; |
192 |
public long errorThreshold = 0; |
Lines 393-398
Link Here
|
393 |
optionsMap.put(OPTION_ReportNullReference, getSeverityString(NullReference)); |
395 |
optionsMap.put(OPTION_ReportNullReference, getSeverityString(NullReference)); |
394 |
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); |
396 |
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); |
395 |
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); |
397 |
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); |
|
|
398 |
optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment)); |
396 |
return optionsMap; |
399 |
return optionsMap; |
397 |
} |
400 |
} |
398 |
|
401 |
|
Lines 633-639
Link Here
|
633 |
if ((optionValue = optionsMap.get(OPTION_ReportIncompleteEnumSwitch)) != null) updateSeverity(IncompleteEnumSwitch, optionValue); |
636 |
if ((optionValue = optionsMap.get(OPTION_ReportIncompleteEnumSwitch)) != null) updateSeverity(IncompleteEnumSwitch, optionValue); |
634 |
if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue); |
637 |
if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue); |
635 |
if ((optionValue = optionsMap.get(OPTION_ReportUnusedLabel)) != null) updateSeverity(UnusedLabel, optionValue); |
638 |
if ((optionValue = optionsMap.get(OPTION_ReportUnusedLabel)) != null) updateSeverity(UnusedLabel, optionValue); |
636 |
|
639 |
if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue); |
|
|
640 |
|
637 |
// Javadoc options |
641 |
// Javadoc options |
638 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
642 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
639 |
if (ENABLED.equals(optionValue)) { |
643 |
if (ENABLED.equals(optionValue)) { |
Lines 798-803
Link Here
|
798 |
buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$ |
802 |
buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$ |
799 |
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ |
803 |
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ |
800 |
buf.append("\n\t- treat optional error as fatal: ").append(this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); //$NON-NLS-1$ |
804 |
buf.append("\n\t- treat optional error as fatal: ").append(this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); //$NON-NLS-1$ |
|
|
805 |
buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ |
801 |
return buf.toString(); |
806 |
return buf.toString(); |
802 |
} |
807 |
} |
803 |
|
808 |
|
Lines 898-903
Link Here
|
898 |
OPTION_ReportUnusedPrivateMember, |
903 |
OPTION_ReportUnusedPrivateMember, |
899 |
OPTION_ReportVarargsArgumentNeedCast, |
904 |
OPTION_ReportVarargsArgumentNeedCast, |
900 |
OPTION_ReportUnhandledWarningToken, |
905 |
OPTION_ReportUnhandledWarningToken, |
|
|
906 |
OPTION_ReportParameterAssignment, |
901 |
}; |
907 |
}; |
902 |
return result; |
908 |
return result; |
903 |
} |
909 |
} |
Lines 949-954
Link Here
|
949 |
return "unchecked"; //$NON-NLS-1$ |
955 |
return "unchecked"; //$NON-NLS-1$ |
950 |
case (int) UnusedLabel: |
956 |
case (int) UnusedLabel: |
951 |
return "unused"; //$NON-NLS-1$ |
957 |
return "unused"; //$NON-NLS-1$ |
|
|
958 |
case (int) (ParameterAssignment >>> 32) : |
959 |
return "paramAssign"; //$NON-NLS-1$ |
952 |
} |
960 |
} |
953 |
} |
961 |
} |
954 |
return null; |
962 |
return null; |
Lines 985-990
Link Here
|
985 |
if ("nls".equals(warningToken)) //$NON-NLS-1$ |
993 |
if ("nls".equals(warningToken)) //$NON-NLS-1$ |
986 |
return NonExternalizedString; |
994 |
return NonExternalizedString; |
987 |
break; |
995 |
break; |
|
|
996 |
case 'p' : |
997 |
if ("paramAssign".equals(warningToken)) //$NON-NLS-1$ |
998 |
return ParameterAssignment; |
999 |
break; |
988 |
case 's' : |
1000 |
case 's' : |
989 |
if ("serial".equals(warningToken)) //$NON-NLS-1$ |
1001 |
if ("serial".equals(warningToken)) //$NON-NLS-1$ |
990 |
return MissingSerialVersion; |
1002 |
return MissingSerialVersion; |