From ef4360265c2b40a237233d37764ef205aec09c5e Mon Sep 17 00:00:00 2001 From: Svata Dedic Date: Mon, 20 Jan 2025 13:17:56 +0100 Subject: [PATCH] Change parameter order for runDebug, compat with NBLS codelenses. --- java/java.lsp.server/vscode/src/extension.ts | 8 ++++---- java/java.lsp.server/vscode/src/testAdapter.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/java/java.lsp.server/vscode/src/extension.ts b/java/java.lsp.server/vscode/src/extension.ts index f5a88b2b80e8..107c86ee3a4a 100644 --- a/java/java.lsp.server/vscode/src/extension.ts +++ b/java/java.lsp.server/vscode/src/extension.ts @@ -953,16 +953,16 @@ export function activate(context: ExtensionContext): VSNetBeansAPI { testAdapter?.registerRunInParallelProfile(projects); })); - context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.run.test', async (uri, methodName?, nestedClass?, launchConfiguration?, testInParallel?, projects?) => { + context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.run.test', async (uri, methodName?, launchConfiguration?, nestedClass?, testInParallel?, projects?) => { await runDebug(true, true, uri, methodName, nestedClass, launchConfiguration, false, testInParallel, projects); })); - context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.debug.test', async (uri, methodName?, nestedClass?, launchConfiguration?) => { + context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.debug.test', async (uri, methodName?, launchConfiguration?, nestedClass?) => { await runDebug(false, true, uri, methodName, nestedClass, launchConfiguration); })); - context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.run.single', async (uri, methodName?, nestedClass?, launchConfiguration?) => { + context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.run.single', async (uri, methodName?, launchConfiguration?, nestedClass?) => { await runDebug(true, false, uri, methodName, nestedClass, launchConfiguration); })); - context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.debug.single', async (uri, methodName?, nestedClass?, launchConfiguration?) => { + context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.debug.single', async (uri, methodName?, launchConfiguration?, nestedClass?) => { await runDebug(false, false, uri, methodName, nestedClass, launchConfiguration); })); context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.project.run', async (node, launchConfiguration?) => { diff --git a/java/java.lsp.server/vscode/src/testAdapter.ts b/java/java.lsp.server/vscode/src/testAdapter.ts index e4c133950b4c..4afcc7131f8a 100644 --- a/java/java.lsp.server/vscode/src/testAdapter.ts +++ b/java/java.lsp.server/vscode/src/testAdapter.ts @@ -107,7 +107,8 @@ export class NbTestAdapter { } if (!cancellation.isCancellationRequested) { try { - await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? COMMAND_PREFIX + '.debug.single' : COMMAND_PREFIX + '.run.single', item.uri.toString(), idx < 0 ? undefined : item.id.slice(idx + 1), nestedClass); + await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? COMMAND_PREFIX + '.debug.single' : COMMAND_PREFIX + '.run.single', item.uri.toString(), idx < 0 ? undefined : item.id.slice(idx + 1), + undefined /* configuration */, nestedClass); } catch(err) { // test state will be handled in the code below console.log(err);