@@ -22,6 +22,7 @@ import { XmlContentProvider } from './providers/XmlContentProvider';
22
22
import { ObjectScriptExplorerProvider } from './explorer/explorer' ;
23
23
import { outputChannel , currentWorkspaceFolder } from './utils' ;
24
24
import { AtelierAPI } from './api' ;
25
+ import { WorkspaceNode } from './explorer/models/workspaceNode' ;
25
26
export var explorerProvider : ObjectScriptExplorerProvider ;
26
27
export var documentContentProvider : DocumentContentProvider ;
27
28
export var workspaceState : vscode . Memento ;
@@ -31,7 +32,9 @@ export const config = (config?: string, workspaceFolderName?: string): any => {
31
32
32
33
if ( [ 'conn' ] . includes ( config ) ) {
33
34
if ( workspaceFolderName !== '' ) {
34
- const workspaceFolder = vscode . workspace . workspaceFolders . find ( el => el . name === workspaceFolderName ) ;
35
+ const workspaceFolder = vscode . workspace . workspaceFolders . find (
36
+ el => el . name . toLowerCase ( ) === workspaceFolderName . toLowerCase ( )
37
+ ) ;
35
38
return vscode . workspace . getConfiguration ( 'objectscript' , workspaceFolder . uri ) . get ( config ) ;
36
39
} else {
37
40
return vscode . workspace . getConfiguration ( 'objectscript' , null ) . get ( config ) ;
@@ -130,13 +133,21 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
130
133
vscode . commands . registerCommand ( 'vscode-objectscript.explorer.openClass' , vscode . window . showTextDocument ) ,
131
134
vscode . commands . registerCommand ( 'vscode-objectscript.explorer.openRoutine' , vscode . window . showTextDocument ) ,
132
135
vscode . commands . registerCommand ( 'vscode-objectscript.explorer.export' , exportExplorerItem ) ,
133
- vscode . commands . registerCommand ( 'vscode-objectscript.explorer.showSystem' , ( ) => {
134
- vscode . commands . executeCommand ( 'setContext' , 'vscode-objectscript.explorer.showSystem' , true ) ;
135
- explorerProvider . showSystem = true ;
136
+ vscode . commands . registerCommand ( 'vscode-objectscript.explorer.showSystem' , ( workspaceNode ?: WorkspaceNode ) => {
137
+ if ( workspaceNode ) {
138
+ explorerProvider . showSystem4Workspace ( workspaceNode . label , true ) ;
139
+ } else {
140
+ vscode . commands . executeCommand ( 'setContext' , 'vscode-objectscript.explorer.showSystem' , true ) ;
141
+ explorerProvider . showSystem = true ;
142
+ }
136
143
} ) ,
137
- vscode . commands . registerCommand ( 'vscode-objectscript.explorer.hideSystem' , ( ) => {
138
- vscode . commands . executeCommand ( 'setContext' , 'vscode-objectscript.explorer.showSystem' , false ) ;
139
- explorerProvider . showSystem = false ;
144
+ vscode . commands . registerCommand ( 'vscode-objectscript.explorer.hideSystem' , ( workspaceNode ?) => {
145
+ if ( workspaceNode ) {
146
+ explorerProvider . showSystem4Workspace ( workspaceNode . label , false ) ;
147
+ } else {
148
+ vscode . commands . executeCommand ( 'setContext' , 'vscode-objectscript.explorer.showSystem' , false ) ;
149
+ explorerProvider . showSystem = false ;
150
+ }
140
151
} ) ,
141
152
vscode . commands . registerCommand ( 'vscode-objectscript.previewXml' , ( ...args ) => {
142
153
xml2doc ( context , window . activeTextEditor ) ;
0 commit comments