Skip to content

Commit 04b2bb0

Browse files
authored
Merge pull request apache#8173 from sdedic/lsp/run-nestedclass-fix
Change parameter order for runDebug, compat with NBLS codelenses.
2 parents 235b99a + ef43602 commit 04b2bb0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

java/java.lsp.server/vscode/src/extension.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,16 +953,16 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
953953
testAdapter?.registerRunInParallelProfile(projects);
954954
}));
955955

956-
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.run.test', async (uri, methodName?, nestedClass?, launchConfiguration?, testInParallel?, projects?) => {
956+
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.run.test', async (uri, methodName?, launchConfiguration?, nestedClass?, testInParallel?, projects?) => {
957957
await runDebug(true, true, uri, methodName, nestedClass, launchConfiguration, false, testInParallel, projects);
958958
}));
959-
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.debug.test', async (uri, methodName?, nestedClass?, launchConfiguration?) => {
959+
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.debug.test', async (uri, methodName?, launchConfiguration?, nestedClass?) => {
960960
await runDebug(false, true, uri, methodName, nestedClass, launchConfiguration);
961961
}));
962-
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.run.single', async (uri, methodName?, nestedClass?, launchConfiguration?) => {
962+
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.run.single', async (uri, methodName?, launchConfiguration?, nestedClass?) => {
963963
await runDebug(true, false, uri, methodName, nestedClass, launchConfiguration);
964964
}));
965-
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.debug.single', async (uri, methodName?, nestedClass?, launchConfiguration?) => {
965+
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.debug.single', async (uri, methodName?, launchConfiguration?, nestedClass?) => {
966966
await runDebug(false, false, uri, methodName, nestedClass, launchConfiguration);
967967
}));
968968
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.project.run', async (node, launchConfiguration?) => {

java/java.lsp.server/vscode/src/testAdapter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ export class NbTestAdapter {
107107
}
108108
if (!cancellation.isCancellationRequested) {
109109
try {
110-
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);
110+
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),
111+
undefined /* configuration */, nestedClass);
111112
} catch(err) {
112113
// test state will be handled in the code below
113114
console.log(err);

0 commit comments

Comments
 (0)