Lines 101-106
Link Here
|
101 |
public static final String OPTION_ReportDiscouragedReference = "org.eclipse.jdt.core.compiler.problem.discouragedReference"; //$NON-NLS-1$ |
101 |
public static final String OPTION_ReportDiscouragedReference = "org.eclipse.jdt.core.compiler.problem.discouragedReference"; //$NON-NLS-1$ |
102 |
public static final String OPTION_SuppressWarnings = "org.eclipse.jdt.core.compiler.problem.suppressWarnings"; //$NON-NLS-1$ |
102 |
public static final String OPTION_SuppressWarnings = "org.eclipse.jdt.core.compiler.problem.suppressWarnings"; //$NON-NLS-1$ |
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_ReportParameterAssignment = "org.eclipse.jdt.core.compiler.problem.parameterAssignment"; //$NON-NLS-1$ |
104 |
|
105 |
|
105 |
// Backward compatibility |
106 |
// Backward compatibility |
106 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
107 |
public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$ |
Lines 180-185
Link Here
|
180 |
public static final long MissingDeprecatedAnnotation = ASTNode.Bit43L; |
181 |
public static final long MissingDeprecatedAnnotation = ASTNode.Bit43L; |
181 |
public static final long DiscouragedReference = ASTNode.Bit44L; |
182 |
public static final long DiscouragedReference = ASTNode.Bit44L; |
182 |
public static final long UnhandledWarningToken = ASTNode.Bit45L; |
183 |
public static final long UnhandledWarningToken = ASTNode.Bit45L; |
|
|
184 |
public static final long ParameterAssignment = ASTNode.Bit46L; |
183 |
|
185 |
|
184 |
// TODO (olivier) remove once http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21540 is fixed |
186 |
// TODO (olivier) remove once http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21540 is fixed |
185 |
private static final int IntMissingSerialVersion = (int) (MissingSerialVersion >>> 32); |
187 |
private static final int IntMissingSerialVersion = (int) (MissingSerialVersion >>> 32); |
Lines 187-192
Link Here
|
187 |
private static final int IntTypeParameterHiding = (int) (TypeParameterHiding >>> 32); |
189 |
private static final int IntTypeParameterHiding = (int) (TypeParameterHiding >>> 32); |
188 |
private static final int IntIncompleteEnumSwitch = (int) (IncompleteEnumSwitch >>> 32); |
190 |
private static final int IntIncompleteEnumSwitch = (int) (IncompleteEnumSwitch >>> 32); |
189 |
private static final int IntMissingDeprecatedAnnotation = (int) (MissingDeprecatedAnnotation >>> 32); |
191 |
private static final int IntMissingDeprecatedAnnotation = (int) (MissingDeprecatedAnnotation >>> 32); |
|
|
192 |
private static final int IntParameterAssignment = (int) (ParameterAssignment >>> 32); |
190 |
|
193 |
|
191 |
// Default severity level for handlers |
194 |
// Default severity level for handlers |
192 |
public long errorThreshold = 0; |
195 |
public long errorThreshold = 0; |
Lines 310-316
Link Here
|
310 |
} |
313 |
} |
311 |
|
314 |
|
312 |
public Map getMap() { |
315 |
public Map getMap() { |
313 |
Map optionsMap = new HashMap(30); |
316 |
Map optionsMap = new HashMap(96, 1.0f); |
314 |
optionsMap.put(OPTION_LocalVariableAttribute, (this.produceDebugAttributes & Vars) != 0 ? GENERATE : DO_NOT_GENERATE); |
317 |
optionsMap.put(OPTION_LocalVariableAttribute, (this.produceDebugAttributes & Vars) != 0 ? GENERATE : DO_NOT_GENERATE); |
315 |
optionsMap.put(OPTION_LineNumberAttribute, (this.produceDebugAttributes & Lines) != 0 ? GENERATE : DO_NOT_GENERATE); |
318 |
optionsMap.put(OPTION_LineNumberAttribute, (this.produceDebugAttributes & Lines) != 0 ? GENERATE : DO_NOT_GENERATE); |
316 |
optionsMap.put(OPTION_SourceFileAttribute, (this.produceDebugAttributes & Source) != 0 ? GENERATE : DO_NOT_GENERATE); |
319 |
optionsMap.put(OPTION_SourceFileAttribute, (this.produceDebugAttributes & Source) != 0 ? GENERATE : DO_NOT_GENERATE); |
Lines 387-392
Link Here
|
387 |
optionsMap.put(OPTION_ReportNullReference, getSeverityString(NullReference)); |
390 |
optionsMap.put(OPTION_ReportNullReference, getSeverityString(NullReference)); |
388 |
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); |
391 |
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); |
389 |
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); |
392 |
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); |
|
|
393 |
optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment)); |
390 |
return optionsMap; |
394 |
return optionsMap; |
391 |
} |
395 |
} |
392 |
|
396 |
|
Lines 618-623
Link Here
|
618 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingDeprecatedAnnotation)) != null) updateSeverity(MissingDeprecatedAnnotation, optionValue); |
622 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingDeprecatedAnnotation)) != null) updateSeverity(MissingDeprecatedAnnotation, optionValue); |
619 |
if ((optionValue = optionsMap.get(OPTION_ReportIncompleteEnumSwitch)) != null) updateSeverity(IncompleteEnumSwitch, optionValue); |
623 |
if ((optionValue = optionsMap.get(OPTION_ReportIncompleteEnumSwitch)) != null) updateSeverity(IncompleteEnumSwitch, optionValue); |
620 |
if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue); |
624 |
if ((optionValue = optionsMap.get(OPTION_ReportUnhandledWarningToken)) != null) updateSeverity(UnhandledWarningToken, optionValue); |
|
|
625 |
if ((optionValue = optionsMap.get(OPTION_ReportParameterAssignment)) != null) updateSeverity(ParameterAssignment, optionValue); |
621 |
|
626 |
|
622 |
// Javadoc options |
627 |
// Javadoc options |
623 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
628 |
if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) { |
Lines 780-785
Link Here
|
780 |
buf.append("\n\t- incomplete enum switch: ").append(getSeverityString(IncompleteEnumSwitch)); //$NON-NLS-1$ |
785 |
buf.append("\n\t- incomplete enum switch: ").append(getSeverityString(IncompleteEnumSwitch)); //$NON-NLS-1$ |
781 |
buf.append("\n\t- suppress warnings: ").append(this.suppressWarnings ? ENABLED : DISABLED); //$NON-NLS-1$ |
786 |
buf.append("\n\t- suppress warnings: ").append(this.suppressWarnings ? ENABLED : DISABLED); //$NON-NLS-1$ |
782 |
buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$ |
787 |
buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$ |
|
|
788 |
buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ |
783 |
return buf.toString(); |
789 |
return buf.toString(); |
784 |
} |
790 |
} |
785 |
|
791 |
|
Lines 875-880
Link Here
|
875 |
OPTION_ReportUnusedPrivateMember, |
881 |
OPTION_ReportUnusedPrivateMember, |
876 |
OPTION_ReportVarargsArgumentNeedCast, |
882 |
OPTION_ReportVarargsArgumentNeedCast, |
877 |
OPTION_ReportUnhandledWarningToken, |
883 |
OPTION_ReportUnhandledWarningToken, |
|
|
884 |
OPTION_ReportParameterAssignment, |
878 |
}; |
885 |
}; |
879 |
return result; |
886 |
return result; |
880 |
} |
887 |
} |
Lines 923-928
Link Here
|
923 |
return "incomplete-switch"; //$NON-NLS-1$ |
930 |
return "incomplete-switch"; //$NON-NLS-1$ |
924 |
case IntMissingDeprecatedAnnotation : |
931 |
case IntMissingDeprecatedAnnotation : |
925 |
return "dep-ann"; //$NON-NLS-1$ |
932 |
return "dep-ann"; //$NON-NLS-1$ |
|
|
933 |
case IntParameterAssignment : |
934 |
return "parameter-assignment"; //$NON-NLS-1$ |
926 |
} |
935 |
} |
927 |
} |
936 |
} |
928 |
return null; |
937 |
return null; |
Lines 959-964
Link Here
|
959 |
if ("nls".equals(warningToken)) //$NON-NLS-1$ |
968 |
if ("nls".equals(warningToken)) //$NON-NLS-1$ |
960 |
return NonExternalizedString; |
969 |
return NonExternalizedString; |
961 |
break; |
970 |
break; |
|
|
971 |
case 'p' : |
972 |
if ("parameter-assignment".equals(warningToken)) //$NON-NLS-1$ |
973 |
return ParameterAssignment; |
974 |
break; |
962 |
case 's' : |
975 |
case 's' : |
963 |
if ("serial".equals(warningToken)) //$NON-NLS-1$ |
976 |
if ("serial".equals(warningToken)) //$NON-NLS-1$ |
964 |
return MissingSerialVersion; |
977 |
return MissingSerialVersion; |