Skip to content

Commit e85cb10

Browse files
adonovangopherbot
authored andcommitted
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 <[email protected]> kokoro-CI: kokoro <[email protected]> Commit-Queue: Alan Donovan <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Hongxiang Jiang <[email protected]>
1 parent 5e506ea commit e85cb10

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

docs/commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ Extract logs in the `gopls (server)` output channel to the editor.
139139

140140
Open the welcome page for the Go extension.
141141

142-
### `Go: Toggle gc details`
142+
### `Go: Toggle compiler optimization details`
143143

144-
Toggle the display of compiler optimization choices
144+
Toggle the per-package flag that causes compiler optimization details to be reported as diagnostics
145145

146146
### `Go: Add Import`
147147

extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@
355355
},
356356
{
357357
"command": "go.toggle.gc_details",
358-
"title": "Go: Toggle gc details",
359-
"description": "Toggle the display of compiler optimization choices"
358+
"title": "Go: Toggle compiler optimization details",
359+
"description": "Toggle the per-package flag that causes compiler optimization details to be reported as diagnostics"
360360
},
361361
{
362362
"command": "go.import.add",

extension/src/commands/toggleGCDetails.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@ export const toggleGCDetails: CommandFactory = (ctx, goCtx) => {
1111
return async () => {
1212
if (!goCtx.languageServerIsRunning) {
1313
vscode.window.showErrorMessage(
14-
'"Go: Toggle gc details" command is available only when the language server is running'
14+
'"Go: Toggle compiler optimization details" command is available only when the language server is running'
1515
);
1616
return;
1717
}
1818
const doc = vscode.window.activeTextEditor?.document.uri.toString();
1919
if (!doc || !doc.endsWith('.go')) {
20-
vscode.window.showErrorMessage('"Go: Toggle gc details" command cannot run when no Go file is open.');
20+
vscode.window.showErrorMessage(
21+
'"Go: Toggle compiler optimization details" command cannot run when no Go file is open.'
22+
);
2123
return;
2224
}
2325
try {
2426
await vscode.commands.executeCommand('gopls.gc_details', doc);
2527
} catch (e) {
26-
vscode.window.showErrorMessage(`"Go: Toggle gc details" command failed: ${e}`);
28+
vscode.window.showErrorMessage(`"Go: Toggle compiler optimization details" command failed: ${e}`);
2729
}
2830
};
2931
};

0 commit comments

Comments
 (0)