@@ -110,7 +110,7 @@ function traverseAndRegisterCommands(context, preCmds, nodes) {
110110 }
111111}
112112
113- // Recursively traverse the tree nodes and register the Apio
113+ // Recursively traverse the tree nodes and register the Apio
114114// buttons.
115115function traverseAndRegisterTreeButtons ( context , nodesList ) {
116116 for ( const node of nodesList ) {
@@ -174,8 +174,6 @@ class ApioTreeProvider {
174174 }
175175}
176176
177-
178-
179177// A function to execute an action. Action can have commands anr/or url.
180178function launchAction ( cmds , url , apioBinaryPath ) {
181179 // return () => {
@@ -313,11 +311,17 @@ function activate(context) {
313311 // Init Apio log output channel.
314312 apioLog . init ( context ) ;
315313
316- // outputChannel = vscode.window.createOutputChannel("Apio");
317- // context.subscriptions.push(outputChannel);
318-
319314 apioLog . msg ( "activate() started." ) ;
320315
316+ // Check that we are on a supported platforms.
317+ const platformId = platforms . getPlatformId ( ) ;
318+ if ( ! platforms . SUPPORTED_PLATFORMS_IDS . includes ( platformId ) ) {
319+ apioLog . msg (
320+ `Platform id ${ platformId } is not supported by this extension.`
321+ ) ;
322+ return ;
323+ }
324+
321325 // Determine the workspace folder, do nothing if none.
322326 const ws = vscode . workspace . workspaceFolders ?. [ 0 ] ;
323327 if ( ! ws ) {
@@ -338,12 +342,10 @@ function activate(context) {
338342 apioLog . msg ( `apio.ini file not found at ${ apioIniPath } ` ) ;
339343 return ;
340344 }
341- apioLog . msg ( "apio.ini found" ) ;
345+ apioLog . msg ( "apio.ini found, activating the extension " ) ;
342346
343347 // Here we are committed to activate the extension.
344348
345- // apioLog.msg(`Platform id: ${platforms.getPlatformId()}`)
346-
347349 apioLog . msg ( `Platform id: ${ platforms . getPlatformId ( ) } ` ) ;
348350 apioLog . msg ( `isWindows: ${ platforms . isWindows ( ) } ` ) ;
349351 apioLog . msg ( `isLinux: ${ platforms . isLinux ( ) } ` ) ;
0 commit comments