File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 91
91
"command" : " nativescript.runAndroid" ,
92
92
"title" : " Run on Android" ,
93
93
"category" : " NativeScript"
94
+ },
95
+ {
96
+ "command" : " nativescript.showOutputChannel" ,
97
+ "title" : " Show Output Channel" ,
98
+ "category" : " NativeScript"
94
99
}
95
100
],
96
101
"keybindings" : [
103
108
"command" : " nativescript.runAndroid" ,
104
109
"key" : " ctrl+alt+a" ,
105
110
"mac" : " cmd+alt+a"
111
+ },
112
+ {
113
+ "command" : " nativescript.showOutputChannel" ,
114
+ "key" : " ctrl+alt+n ctrl+alt+o" ,
115
+ "mac" : " cmd+alt+n cmd+alt+o"
106
116
}
107
117
],
108
118
"debuggers" : [
Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ export function activate(context: vscode.ExtensionContext) {
26
26
vscode . window . showErrorMessage ( cliVersion . errorMessage ) ;
27
27
}
28
28
29
- logInfo ( cliVersion . version . toString ( ) ) ;
29
+ let channel = createInfoChannel ( cliVersion . version . toString ( ) ) ;
30
+ let showOutputChannelCommand = vscode . commands . registerCommand ( 'nativescript.showOutputChannel' , ( ) => {
31
+ channel . show ( ) ;
32
+ } ) ;
30
33
31
34
let runCommand = ( project : Project ) => {
32
35
if ( vscode . workspace . rootPath === undefined ) {
@@ -74,16 +77,19 @@ export function activate(context: vscode.ExtensionContext) {
74
77
75
78
context . subscriptions . push ( runIosCommand ) ;
76
79
context . subscriptions . push ( runAndroidCommand ) ;
80
+ context . subscriptions . push ( showOutputChannelCommand ) ;
77
81
}
78
82
79
- function logInfo ( cliVersion : string ) {
83
+ function createInfoChannel ( cliVersion : string ) : vscode . OutputChannel {
80
84
let channel = vscode . window . createOutputChannel ( "NativeScript Extension" ) ;
81
85
const packageJSON = vscode . extensions . getExtension ( "Telerik.nativescript" ) . packageJSON ;
82
86
83
87
packageJSON . version && channel . appendLine ( `Version: ${ packageJSON . version } ` ) ;
84
88
packageJSON . buildVersion && channel . appendLine ( `Build version: ${ packageJSON . buildVersion } ` ) ;
85
89
packageJSON . commitId && channel . appendLine ( `Commit id: ${ packageJSON . commitId } ` ) ;
86
90
channel . appendLine ( `NativeScript CLI: ${ cliVersion } ` ) ;
91
+
92
+ return channel ;
87
93
}
88
94
89
95
export function deactivate ( ) {
You can’t perform that action at this time.
0 commit comments