Skip to content

Commit

Permalink
New UI option to configure problem severity for unused lambda parameters
Browse files Browse the repository at this point in the history
Fixes #1721
  • Loading branch information
noopur2507 committed Oct 22, 2024
1 parent b8fb344 commit 44f42de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ private PreferencesMessages() {
public static String ProblemSeveritiesConfigurationBlock_pb_static_access_receiver_label;
public static String ProblemSeveritiesConfigurationBlock_pb_unused_imports_label;
public static String ProblemSeveritiesConfigurationBlock_pb_unused_local_label;
public static String ProblemSeveritiesConfigurationBlock_pb_unused_lambda_parameter_label;
public static String ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label;
public static String ProblemSeveritiesConfigurationBlock_pb_unused_exception_parameter_label;
public static String ProblemSeveritiesConfigurationBlock_pb_unused_type_parameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ ProblemSeveritiesConfigurationBlock_pb_hidden_catchblock_label=Hidden catch bloc
ProblemSeveritiesConfigurationBlock_pb_static_access_receiver_label=Non-static access to static member:
ProblemSeveritiesConfigurationBlock_pb_unused_imports_label=Unused &import:
ProblemSeveritiesConfigurationBlock_pb_unused_local_label=&Value of local variable is not used:
ProblemSeveritiesConfigurationBlock_pb_unused_lambda_parameter_label=&Value of lambda parameter is not used (22 or higher):
ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label=Value of method parameter is not used:
ProblemSeveritiesConfigurationBlock_pb_unused_exception_parameter_label=Value of exception parameter is not used:
ProblemSeveritiesConfigurationBlock_pb_unused_type_parameter=Unused type parameter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ public String[] getResult() {

private static final Key PREF_PB_HIDDEN_CATCH_BLOCK= getJDTCoreKey(JavaCore.COMPILER_PB_HIDDEN_CATCH_BLOCK);
private static final Key PREF_PB_UNUSED_LOCAL= getJDTCoreKey(JavaCore.COMPILER_PB_UNUSED_LOCAL);
private static final Key PREF_PB_UNUSED_LAMBDA_PARAMETER= getJDTCoreKey(JavaCore.COMPILER_PB_UNUSED_LAMBDA_PARAMETER);
private static final Key PREF_PB_UNUSED_PARAMETER= getJDTCoreKey(JavaCore.COMPILER_PB_UNUSED_PARAMETER);
private static final Key PREF_PB_UNUSED_EXCEPTION_PARAMETER= getJDTCoreKey(JavaCore.COMPILER_PB_UNUSED_EXCEPTION_PARAMETER);
private static final Key PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING= getJDTCoreKey(JavaCore.COMPILER_PB_UNUSED_PARAMETER_WHEN_OVERRIDING_CONCRETE);
Expand Down Expand Up @@ -842,6 +843,7 @@ public static Key[] getKeys() {
return new Key[] {
PREF_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD,
PREF_PB_METHOD_WITH_CONSTRUCTOR_NAME, PREF_PB_DEPRECATION, PREF_PB_TERMINAL_DEPRECATION, PREF_PB_HIDDEN_CATCH_BLOCK, PREF_PB_UNUSED_LOCAL,
PREF_PB_UNUSED_LAMBDA_PARAMETER,
PREF_PB_API_LEAKS,
PREF_PB_UNSTABLE_AUTO_MODULE_NAME,
PREF_PB_UNUSED_PARAMETER, PREF_PB_UNUSED_EXCEPTION_PARAMETER, PREF_PB_UNUSED_PARAMETER_INCLUDE_DOC_COMMENT_REFERENCE,
Expand Down Expand Up @@ -1201,6 +1203,9 @@ public void widgetSelected(SelectionEvent e) {
label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unused_local_label;
fFilteredPrefTree.addComboBox(inner, label, PREF_PB_UNUSED_LOCAL, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, defaultIndent, section);

label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unused_lambda_parameter_label;
fFilteredPrefTree.addComboBox(inner, label, PREF_PB_UNUSED_LAMBDA_PARAMETER, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, defaultIndent, section);

label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label;
node= fFilteredPrefTree.addComboBox(inner, label, PREF_PB_UNUSED_PARAMETER, errorWarningInfoIgnore, errorWarningInfoIgnoreLabels, defaultIndent, section);

Expand Down

0 comments on commit 44f42de

Please sign in to comment.