michael-hoke commented on code in PR #1336:
URL: https://github.com/apache/daffodil-vscode/pull/1336#discussion_r2245536375
##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -410,13 +425,12 @@ export function activateDaffodilDebug(
.map((obj) => obj.name) as string[]
// dropdown
- return await vscode.window
- .showQuickPick(test_case_names, {
- placeHolder: 'Test Case Name',
- })
- .then((value) => {
- return value // return selected dropdown value
- })
+ // Await showQuickPick directly and return the result
+ const selection = await vscode.window.showQuickPick(test_case_names, {
+ placeHolder: 'Test Case Name',
+ })
+
+ return selection
Review Comment:
Not the idea place for this comment, but I'm not a fan of modifying the if
statement at all beyond what it was before. We already have checks in place for
valid values of the action, and the only way to get through the "*.tdml" check
is for a user to manually change the type, and if that happens, this will be
caught by the new error checking I suggested adding on an above comment.
The other thing to keep in mind here is that if we skip this part, the
debugging starts and we have another check later (debugger.ts:~70) on that I've
noticed sees the empty name and prompts for it again, but this time, there's no
argument being passed in, so the picker is empty.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]