Skip to content

Commit 573f191

Browse files
committed
Add showToolsWindowOnStartup setting
Setting azure.showToolsWindowOnStartup to false prevents the Azure Tools panel (outputChannel) being displayed on startup
1 parent e2f18f3 commit 573f191

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
"type": "boolean",
4545
"default": true,
4646
"description": "To opt out of sending basic usage telemetry set this to false. Default is true."
47+
},
48+
"azure.showToolsWindowOnStartup": {
49+
"type": "boolean",
50+
"default": true,
51+
"description": "To prevent the Azure Tools panel showing on startup set this to false. Default is true"
4752
}
4853
}
4954
},
@@ -160,4 +165,4 @@
160165
"octonode": "^0.7.7",
161166
"open": "0.0.5"
162167
}
163-
}
168+
}

src/config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ exports.isTelemetryEnabled = function isTelemetryEnabled() {
2121
return true;
2222
};
2323

24+
exports.showToolsWindowOnStartup = function showToolsWindowOnStartup() {
25+
var f = vscode.workspace.getConfiguration('azure');
26+
if (f != null)
27+
if (f.showToolsWindowOnStartup != null)
28+
if (typeof (f.showToolsWindowOnStartup) === "boolean")
29+
return f.showToolsWindowOnStartup
30+
31+
return true;
32+
};
2433
exports.wireUpServiceClientTelemetry = (serviceClient) => {
2534
var package = require('./../package.json');
2635
var clientVersion = require('util').format('%s/%s',

src/outputChannel.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
var vscode = require('vscode');
2+
var config = require('./config');
3+
24

35
var channel = null;
46

57
function newChannel() {
68
console.log('new channel');
79

810
channel = vscode.window.createOutputChannel('Azure Tools');
9-
channel.show();
11+
if (config.showToolsWindowOnStartup()) {
12+
channel.show();
13+
}
1014
return channel;
1115
}
1216

0 commit comments

Comments
 (0)