Ethan Reesor has uploaded this change for review.
all: add setting to disable test explorer
Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
---
M docs/settings.md
M package.json
M src/goMain.ts
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/docs/settings.md b/docs/settings.md
index 62dafd1..5f34fdc 100644
--- a/docs/settings.md
+++ b/docs/settings.md
@@ -403,6 +403,11 @@
Concatenate all test log messages for a given location into a single message.
Default: `true`
+### `go.testExplorer.enable`
+
+Enable the Go test explorer
+
+Default: `true`
### `go.testExplorer.packageDisplayMode`
Present packages in the test explorer flat or nested.<br/>
diff --git a/package.json b/package.json
index 529651e..f5b744e 100644
--- a/package.json
+++ b/package.json
@@ -1302,6 +1302,12 @@
"description": "Flags to pass to `go test`. If null, then buildFlags will be used. This is not propagated to the language server.",
"scope": "resource"
},
+ "go.testExplorer.enable": {
+ "type": "boolean",
+ "default": true,
+ "scope": "window",
+ "description": "Enable the Go test explorer"
+ },
"go.testExplorer.packageDisplayMode": {
"type": "string",
"enum": [
diff --git a/src/goMain.ts b/src/goMain.ts
index eddba07..30fd73a 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -336,7 +336,7 @@
})
);
- if (isVscodeTestingAPIAvailable) {
+ if (isVscodeTestingAPIAvailable && cfg.get<boolean>('testExplorer.enable')) {
GoTestExplorer.setup(ctx);
}
@@ -531,6 +531,15 @@
// TODO: actively maintain our own disposables instead of keeping pushing to ctx.subscription.
}
}
+ if (e.affectsConfiguration('go.testExplorer.enable')) {
+ const msg =
+ 'Go test explorer has been enabled or disabled. For this change to take effect, the window must be reloaded.';
+ vscode.window.showInformationMessage(msg, 'Reload').then((selected) => {
+ if (selected === 'Reload') {
+ vscode.commands.executeCommand('workbench.action.reloadWindow');
+ }
+ });
+ }
})
);
To view, visit change 350157. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Hyang-Ah Hana Kim.
1 comment:
Patchset:
In the future, I plan to improve the UX around this setting so the user doesn't have to reload the window for it to take effect, but I wanted to make this CL as simple as possible.
To view, visit change 350157. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Ethan Reesor.
Patch set 1:Run-TryBot +1Code-Review +2Trust +1
Attention is currently required from: Ethan Reesor.
Patch set 1:Trust +1
Suzy Mueller submitted this change.
all: add setting to disable test explorer
Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/350157
Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
Trust: Hyang-Ah Hana Kim <hya...@gmail.com>
Trust: Suzy Mueller <suz...@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hya...@gmail.com>
To view, visit change 350157. To unsubscribe, or for help writing mail filters, visit settings.
Hyang-Ah Hana Kim has uploaded this change for review.
[release] all: add setting to disable test explorer
Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/350157
Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
Trust: Hyang-Ah Hana Kim <hya...@gmail.com>
Trust: Suzy Mueller <suz...@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hya...@gmail.com>
(cherry picked from commit 20812b7aa7f5901b788fed776c240e40997ab0de)
---
M docs/settings.md
M package.json
M src/goMain.ts
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/docs/settings.md b/docs/settings.md
index 62dafd1..5f34fdc 100644
--- a/docs/settings.md
+++ b/docs/settings.md
@@ -403,6 +403,11 @@
Concatenate all test log messages for a given location into a single message.
Default: `true`
+### `go.testExplorer.enable`
+
+Enable the Go test explorer
+
+Default: `true`
### `go.testExplorer.packageDisplayMode`
Present packages in the test explorer flat or nested.<br/>
diff --git a/package.json b/package.json
index 2f52ca9..e0607f3 100644
--- a/package.json
+++ b/package.json
@@ -1301,6 +1301,12 @@
To view, visit change 350146. To unsubscribe, or for help writing mail filters, visit settings.
Patch set 1:Run-TryBot +1
Hyang-Ah Hana Kim abandoned this change.
To view, visit change 350146. To unsubscribe, or for help writing mail filters, visit settings.