From eb2d3c9fd678bfa1597d7f82f22a920ef191f6b5 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Wed, 20 Nov 2024 10:33:23 -0500 Subject: [PATCH] Rename 'removeUnusedLambdaParameters' to 'renameUnusedLocalVariables'. - The clean up now supports additional cases from upstream. Signed-off-by: Roland Grunberg --- .../core/internal/cleanup/RenameUnusedLocalVariableCleanup.java | 2 +- .../org/eclipse/jdt/ls/core/internal/cleanup/CleanUpsTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/cleanup/RenameUnusedLocalVariableCleanup.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/cleanup/RenameUnusedLocalVariableCleanup.java index 4984cb0b33..56a81135b7 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/cleanup/RenameUnusedLocalVariableCleanup.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/cleanup/RenameUnusedLocalVariableCleanup.java @@ -33,7 +33,7 @@ public class RenameUnusedLocalVariableCleanup implements ISimpleCleanUp { @Override public Collection getIdentifiers() { - return List.of("removeUnusedLambdaParameters", CleanUpConstants.REMOVE_UNUSED_CODE_LOCAL_VARIABLES); + return List.of("renameUnusedLocalVariables", CleanUpConstants.REMOVE_UNUSED_CODE_LOCAL_VARIABLES); } @Override diff --git a/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/cleanup/CleanUpsTest.java b/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/cleanup/CleanUpsTest.java index 2a15d17116..b8db37aea8 100644 --- a/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/cleanup/CleanUpsTest.java +++ b/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/cleanup/CleanUpsTest.java @@ -670,7 +670,7 @@ public void test() { } } """; - List textEdits = registry.getEditsForAllActiveCleanUps(new TextDocumentIdentifier(uri), Arrays.asList("removeUnusedLambdaParameters"), monitor); + List textEdits = registry.getEditsForAllActiveCleanUps(new TextDocumentIdentifier(uri), Arrays.asList("renameUnusedLocalVariables"), monitor); String actual = TextEditUtil.apply(unit, textEdits); assertEquals(expected, actual); }