ToggleGCDetails: change UI text
This CL changes the UI elements for this feature to use the phrasing
"Toggle compiler optimization details".
I ran tools/generate.go -w -gopls with gopls/v0.17.1 on my path.
Change-Id: I02f4c9a969774432b5a912d16a11e0c450d172e2
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/639415
Auto-Submit: Alan Donovan <adonovan@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alan Donovan <adonovan@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
diff --git a/docs/commands.md b/docs/commands.md
index 37da3ae..cd61af7 100644
--- a/docs/commands.md
+++ b/docs/commands.md
@@ -139,9 +139,9 @@
Open the welcome page for the Go extension.
-### `Go: Toggle gc details`
+### `Go: Toggle compiler optimization details`
-Toggle the display of compiler optimization choices
+Toggle the per-package flag that causes compiler optimization details to be reported as diagnostics
### `Go: Add Import`
diff --git a/extension/package.json b/extension/package.json
index f9e0e92..7ce4b2f 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -355,8 +355,8 @@
},
{
"command": "go.toggle.gc_details",
- "title": "Go: Toggle gc details",
- "description": "Toggle the display of compiler optimization choices"
+ "title": "Go: Toggle compiler optimization details",
+ "description": "Toggle the per-package flag that causes compiler optimization details to be reported as diagnostics"
},
{
"command": "go.import.add",
diff --git a/extension/src/commands/toggleGCDetails.ts b/extension/src/commands/toggleGCDetails.ts
index 20dfaec..fd7d947 100644
--- a/extension/src/commands/toggleGCDetails.ts
+++ b/extension/src/commands/toggleGCDetails.ts
@@ -11,19 +11,21 @@
return async () => {
if (!goCtx.languageServerIsRunning) {
vscode.window.showErrorMessage(
- '"Go: Toggle gc details" command is available only when the language server is running'
+ '"Go: Toggle compiler optimization details" command is available only when the language server is running'
);
return;
}
const doc = vscode.window.activeTextEditor?.document.uri.toString();
if (!doc || !doc.endsWith('.go')) {
- vscode.window.showErrorMessage('"Go: Toggle gc details" command cannot run when no Go file is open.');
+ vscode.window.showErrorMessage(
+ '"Go: Toggle compiler optimization details" command cannot run when no Go file is open.'
+ );
return;
}
try {
await vscode.commands.executeCommand('gopls.gc_details', doc);
} catch (e) {
- vscode.window.showErrorMessage(`"Go: Toggle gc details" command failed: ${e}`);
+ vscode.window.showErrorMessage(`"Go: Toggle compiler optimization details" command failed: ${e}`);
}
};
};