Skip to content

Commit

Permalink
Merge pull request apache#8173 from sdedic/lsp/run-nestedclass-fix
Browse files Browse the repository at this point in the history
Change parameter order for runDebug, compat with NBLS codelenses.
  • Loading branch information
sdedic authored Jan 20, 2025
2 parents 235b99a + ef43602 commit 04b2bb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions java/java.lsp.server/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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?) => {
Expand Down
3 changes: 2 additions & 1 deletion java/java.lsp.server/vscode/src/testAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 04b2bb0

Please sign in to comment.