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

Command "traces.openTraceFile" - should it be available from command palette? #224

Open
marcdumais-work opened this issue Mar 26, 2024 · 0 comments

Comments

@marcdumais-work
Copy link
Contributor

marcdumais-work commented Mar 26, 2024

ATM command "traces.openTraceFile" (label: "Open with Trace Viewer") is available in the command palette. However it seems to only work when triggered from the explorer's context menu, with a file selection. If triggered from the command palette, it seems to always fail, even if one selects the file before invocation. Should it even be available from the command palette?

The error message is rather cryptic too:

image

Maybe we could register the command using the "when" clause and use contexts to make it available only when appropriate. Here are some contexts that could potentially be used, with example values, when a trace file is selected in the explorer:

"focusedView": "workbench.explorer.fileView",
"workbench.explorer.fileView.active": true,
"resource": "file:///home/user/TraceCompassTutorialTraces/303-jaeger-opentracing-traces/donutJaegerTrace.json",
"resourceScheme": "file",
"resourceFilename": "donutJaegerTrace.json",
"workbench.explorer.fileView.active": true,
"explorerResourceIsFolder": false,
"filesExplorerFocus": true,

Failing that, we could at least adjust the error message to say how that command should be triggered?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant