55'use strict' ;
66
77import { mixin } from 'vs/base/common/objects' ;
8+ import URI from 'vs/base/common/uri' ;
89import Event , { Emitter } from 'vs/base/common/event' ;
910import { WorkspaceConfiguration } from 'vscode' ;
1011import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace' ;
@@ -46,11 +47,11 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape {
4647 this . _onDidChangeConfiguration . fire ( undefined ) ;
4748 }
4849
49- getConfiguration ( section ?: string ) : WorkspaceConfiguration {
50+ getConfiguration ( section ?: string , resource ?: URI ) : WorkspaceConfiguration {
5051
5152 const config = section
52- ? lookUp ( this . _configuration . getValue ( ) , section )
53- : this . _configuration . getValue ( ) ;
53+ ? lookUp ( this . _configuration . getValue ( null , { resource } ) , section )
54+ : this . _configuration . getValue ( null , { resource } ) ;
5455
5556 const result : WorkspaceConfiguration = {
5657 has ( key : string ) : boolean {
@@ -72,15 +73,16 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape {
7273 return this . _proxy . $removeConfigurationOption ( target , key ) ;
7374 }
7475 } ,
75- inspect : < T > ( key : string ) : { key : string ; defaultValue ?: T ; globalValue ?: T ; workspaceValue ?: T } => {
76+ inspect : < T > ( key : string ) : { key : string ; defaultValue ?: T ; globalValue ?: T ; workspaceValue ?: T , folderValue ?: T } => {
7677 key = section ? `${ section } .${ key } ` : key ;
7778 const config = this . _configuration . values ( ) [ key ] ;
7879 if ( config ) {
7980 return {
8081 key,
8182 defaultValue : config . default ,
8283 globalValue : config . user ,
83- workspaceValue : config . workspace
84+ workspaceValue : config . workspace ,
85+ folderValue : config . folder
8486 } ;
8587 }
8688 return undefined ;
0 commit comments