Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose commands' status for commands #740

Open
rajatWipfli opened this issue Jul 17, 2023 · 5 comments
Open

Expose commands' status for commands #740

rajatWipfli opened this issue Jul 17, 2023 · 5 comments
Labels
enhancement New feature or request tracked Already in Backlog

Comments

@rajatWipfli
Copy link

rajatWipfli commented Jul 17, 2023

Select the SuiteCloud tool where you encountered the issue

SuiteCloud Extension for VSCode

Version of the SuiteCloud Tool

v1.4.3

Operating system

Windows 10

Node Version / VSCode Version

v.18.15.0, V1.80

JAVA Version

17.x

Bug description

Is it possible to get the command's result?

I think if we return a value e.g. return action.run from

return vscode.commands.registerCommand(command, (uri?: vscode.Uri) => {
if (!sdkDependenciesDownloadedAndValidated) {
vscode.window.showWarningMessage(translationService.getMessage(EXTENSION_INSTALLATION.WARNING.VALIDATING_SDK_DEPENDENCIES));
return;
}
// Called from a context menu, we receive uri info related to the selected file.
action.run(uri);
});
. It will expose that status.

I am building an internal extension for our project workflows which triggers SuiteClound extension commands. These commands are async but the resulting promise is completed immediately because we don't wait on the action to run.

I am calling executeCommand where docs say that it will return the value of the handler function.
image

Steps To Reproduce

NA

Actual Output

No response

Expected Output

No response

Anything else?

No response

@davidecorreu davidecorreu added the enhancement New feature or request label Jul 18, 2023
@davidecorreu
Copy link
Member

As this is not causing any problem to the extension itself, I'll mark the issue as enhancement.
Maybe we could be: return action.run(uri); on line 44 so your code could be awaiting for the resulting promise.

We'll take a look and evaluate.

@rajatWipfli
Copy link
Author

Yeah, thanks.

@rajatWipfli
Copy link
Author

@davidecorreu No rush but did you get the chance to review this? I am trying to understand the next steps. Do you have any estimates on when action would be taken on this?

@rajatWipfli
Copy link
Author

Any plan for this?

@tourajvaziri
Copy link

Hi @rajatWipfli we will go over it and evaluate the fix.

@tourajvaziri tourajvaziri added the tracked Already in Backlog label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tracked Already in Backlog
Projects
None yet
Development

No branches or pull requests

3 participants