File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 9191 "command" : " nativescript.runAndroid" ,
9292 "title" : " Run on Android" ,
9393 "category" : " NativeScript"
94+ },
95+ {
96+ "command" : " nativescript.showOutputChannel" ,
97+ "title" : " Show Output Channel" ,
98+ "category" : " NativeScript"
9499 }
95100 ],
96101 "keybindings" : [
103108 "command" : " nativescript.runAndroid" ,
104109 "key" : " ctrl+alt+a" ,
105110 "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"
106116 }
107117 ],
108118 "debuggers" : [
Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ export function activate(context: vscode.ExtensionContext) {
2626 vscode . window . showErrorMessage ( cliVersion . errorMessage ) ;
2727 }
2828
29- logInfo ( cliVersion . version . toString ( ) ) ;
29+ let channel = createInfoChannel ( cliVersion . version . toString ( ) ) ;
30+ let showOutputChannelCommand = vscode . commands . registerCommand ( 'nativescript.showOutputChannel' , ( ) => {
31+ channel . show ( ) ;
32+ } ) ;
3033
3134 let runCommand = ( project : Project ) => {
3235 if ( vscode . workspace . rootPath === undefined ) {
@@ -74,16 +77,19 @@ export function activate(context: vscode.ExtensionContext) {
7477
7578 context . subscriptions . push ( runIosCommand ) ;
7679 context . subscriptions . push ( runAndroidCommand ) ;
80+ context . subscriptions . push ( showOutputChannelCommand ) ;
7781}
7882
79- function logInfo ( cliVersion : string ) {
83+ function createInfoChannel ( cliVersion : string ) : vscode . OutputChannel {
8084 let channel = vscode . window . createOutputChannel ( "NativeScript Extension" ) ;
8185 const packageJSON = vscode . extensions . getExtension ( "Telerik.nativescript" ) . packageJSON ;
8286
8387 packageJSON . version && channel . appendLine ( `Version: ${ packageJSON . version } ` ) ;
8488 packageJSON . buildVersion && channel . appendLine ( `Build version: ${ packageJSON . buildVersion } ` ) ;
8589 packageJSON . commitId && channel . appendLine ( `Commit id: ${ packageJSON . commitId } ` ) ;
8690 channel . appendLine ( `NativeScript CLI: ${ cliVersion } ` ) ;
91+
92+ return channel ;
8793}
8894
8995export function deactivate ( ) {
You can’t perform that action at this time.
0 commit comments