File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export const schemas = [
14
14
FILESYSTEM_SCHEMA ,
15
15
FILESYSTEM_READONLY_SCHEMA ,
16
16
] ;
17
+ export const filesystemSchemas = [ FILESYSTEM_SCHEMA , FILESYSTEM_READONLY_SCHEMA ] ;
17
18
18
19
import * as url from "url" ;
19
20
import WebSocket = require( "ws" ) ;
@@ -429,6 +430,21 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
429
430
checkConnection ( true , uri ) ;
430
431
} ) ;
431
432
433
+ vscode . workspace . onDidChangeWorkspaceFolders ( ( { added, removed } ) => {
434
+ const folders = vscode . workspace . workspaceFolders ;
435
+ if (
436
+ folders ?. length === 1 &&
437
+ added ?. length === 1 &&
438
+ removed ?. length === 0 &&
439
+ filesystemSchemas . includes ( added [ 0 ] . uri . scheme )
440
+ ) {
441
+ // First folder has been added and is one of the isfs types, so hide the ObjectScript Explorer for this workspace
442
+ vscode . workspace
443
+ . getConfiguration ( "objectscript" )
444
+ . update ( "showExplorer" , false , vscode . ConfigurationTarget . Workspace ) ;
445
+ }
446
+ } ) ;
447
+
432
448
vscode . workspace . onDidChangeConfiguration ( ( { affectsConfiguration } ) => {
433
449
if ( affectsConfiguration ( "objectscript.conn" ) ) {
434
450
checkConnection ( true ) ;
You can’t perform that action at this time.
0 commit comments