Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
0ecc7452
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0ecc7452
编写于
12月 12, 2019
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename
上级
2cbd162c
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
152 addition
and
152 deletion
+152
-152
src/vs/editor/test/common/services/resourceConfigurationService.test.ts
...test/common/services/resourceConfigurationService.test.ts
+41
-41
src/vs/platform/configuration/common/configuration.ts
src/vs/platform/configuration/common/configuration.ts
+17
-17
src/vs/platform/configuration/common/configurationModels.ts
src/vs/platform/configuration/common/configurationModels.ts
+14
-14
src/vs/platform/configuration/test/common/testConfigurationService.ts
...orm/configuration/test/common/testConfigurationService.ts
+2
-2
src/vs/workbench/api/common/extHostConfiguration.ts
src/vs/workbench/api/common/extHostConfiguration.ts
+4
-4
src/vs/workbench/browser/parts/editor/editorStatus.ts
src/vs/workbench/browser/parts/editor/editorStatus.ts
+2
-2
src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts
...kbench/contrib/debug/browser/debugConfigurationManager.ts
+3
-3
src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
...workbench/contrib/extensions/browser/extensionsActions.ts
+2
-2
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
.../workbench/contrib/preferences/browser/settingsEditor2.ts
+1
-1
src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts
...rkbench/contrib/preferences/browser/settingsTreeModels.ts
+5
-5
src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
...vs/workbench/contrib/tasks/browser/abstractTaskService.ts
+3
-3
src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts
...orkbench/contrib/terminal/browser/terminalConfigHelper.ts
+9
-9
src/vs/workbench/contrib/themes/browser/themes.contribution.ts
...s/workbench/contrib/themes/browser/themes.contribution.ts
+2
-2
src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts
src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts
+1
-1
src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts
...ration/test/electron-browser/configurationService.test.ts
+38
-38
src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.ts
...es/filesConfiguration/common/filesConfigurationService.ts
+2
-2
src/vs/workbench/services/themes/browser/workbenchThemeService.ts
...orkbench/services/themes/browser/workbenchThemeService.ts
+5
-5
src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.ts
...ces/workspaces/browser/abstractWorkspaceEditingService.ts
+1
-1
未找到文件。
src/vs/editor/test/common/services/resourceConfigurationService.test.ts
浏览文件 @
0ecc7452
...
...
@@ -50,9 +50,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into given memory target without overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
workspaceFolder
Value
:
'
2
'
default
:
'
1
'
,
userLocal
:
'
2
'
,
workspaceFolder
:
'
2
'
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -63,9 +63,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into given workspace target without overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
workspaceFolder
Value
:
'
2
'
default
:
'
1
'
,
userLocal
:
'
2
'
,
workspaceFolder
:
'
2
'
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -76,9 +76,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into given user target without overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
workspaceFolder
Value
:
'
2
'
default
:
'
1
'
,
userLocal
:
'
2
'
,
workspaceFolder
:
'
2
'
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -89,9 +89,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into given workspace folder target with overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
workspaceFolder
Value
:
'
2
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
workspaceFolder
:
'
2
'
,
workspaceFolderOverridden
:
'
1
'
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -103,9 +103,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived workspace folder target without overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
workspaceFolder
Value
:
'
2
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
workspaceFolder
:
'
2
'
,
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -116,10 +116,10 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived workspace folder target with overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
workspace
Value
:
'
2
'
,
workspaceFolder
Value
:
'
2
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
workspace
:
'
2
'
,
workspaceFolder
:
'
2
'
,
workspaceOverridden
:
'
3
'
,
workspaceFolderOverridden
:
'
1
'
};
...
...
@@ -132,9 +132,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived workspace target without overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
workspace
Value
:
'
2
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
workspace
:
'
2
'
,
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -145,9 +145,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived workspace target with overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
workspace
Value
:
'
2
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
workspace
:
'
2
'
,
workspaceOverridden
:
3
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -159,9 +159,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived user remote target without overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
userRemote
Value
:
'
3
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
userRemote
:
'
3
'
,
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -172,9 +172,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived user remote target with overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
userRemote
Value
:
'
3
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
userRemote
:
'
3
'
,
userRemoteOverridden
:
'
3
'
,
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -185,9 +185,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived user remote target without overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
userRemote
Value
:
'
3
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
userRemote
:
'
3
'
,
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -198,9 +198,9 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived user remote target with overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
userRemote
Value
:
'
3
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
userRemote
:
'
3
'
,
userRemoteOverridden
:
'
3
'
,
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -212,8 +212,8 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived user target without overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
@@ -224,8 +224,8 @@ suite('TextResourceConfigurationService - Update', () => {
test
(
'
updateValue writes into derived user target with overrides
'
,
async
()
=>
{
language
=
'
a
'
;
configurationValue
=
{
default
Value
:
'
1
'
,
userLocal
Value
:
'
2
'
,
default
:
'
1
'
,
userLocal
:
'
2
'
,
userLocalOverridden
:
'
3
'
};
const
resource
=
URI
.
file
(
'
someFile
'
);
...
...
src/vs/platform/configuration/common/configuration.ts
浏览文件 @
0ecc7452
...
...
@@ -65,22 +65,22 @@ export interface IConfigurationChangeEvent {
export
interface
IConfigurationValue
<
T
>
{
readonly
default
Value
?:
T
;
readonly
user
Value
?:
T
;
readonly
userLocal
Value
?:
T
;
readonly
userRemote
Value
?:
T
;
readonly
workspace
Value
?:
T
;
readonly
workspaceFolder
Value
?:
T
;
readonly
memory
Value
?:
T
;
readonly
default
?:
T
;
readonly
user
?:
T
;
readonly
userLocal
?:
T
;
readonly
userRemote
?:
T
;
readonly
workspace
?:
T
;
readonly
workspaceFolder
?:
T
;
readonly
memory
?:
T
;
readonly
value
?:
T
;
readonly
default
?:
{
value
?:
T
,
override
?:
T
};
readonly
user
?:
{
value
?:
T
,
override
?:
T
};
readonly
userLocal
?:
{
value
?:
T
,
override
?:
T
};
readonly
userRemote
?:
{
value
?:
T
,
override
?:
T
};
readonly
workspace
?:
{
value
?:
T
,
override
?:
T
};
readonly
workspaceFolder
?:
{
value
?:
T
,
override
?:
T
};
readonly
memory
?:
{
value
?:
T
,
override
?:
T
};
readonly
default
Target
?:
{
value
?:
T
,
override
?:
T
};
readonly
user
Target
?:
{
value
?:
T
,
override
?:
T
};
readonly
userLocal
Target
?:
{
value
?:
T
,
override
?:
T
};
readonly
userRemote
Target
?:
{
value
?:
T
,
override
?:
T
};
readonly
workspace
Target
?:
{
value
?:
T
,
override
?:
T
};
readonly
workspaceFolder
Target
?:
{
value
?:
T
,
override
?:
T
};
readonly
memory
Target
?:
{
value
?:
T
,
override
?:
T
};
}
export
interface
IConfigurationService
{
...
...
@@ -357,11 +357,11 @@ export function getMigratedSettingValue<T>(configurationService: IConfigurationS
const
setting
=
configurationService
.
inspect
<
T
>
(
currentSettingName
);
const
legacySetting
=
configurationService
.
inspect
<
T
>
(
legacySettingName
);
if
(
typeof
setting
.
user
Value
!==
'
undefined
'
||
typeof
setting
.
workspaceValue
!==
'
undefined
'
||
typeof
setting
.
workspaceFolderValue
!==
'
undefined
'
)
{
if
(
typeof
setting
.
user
!==
'
undefined
'
||
typeof
setting
.
workspace
!==
'
undefined
'
||
typeof
setting
.
workspaceFolder
!==
'
undefined
'
)
{
return
setting
.
value
!
;
}
else
if
(
typeof
legacySetting
.
user
Value
!==
'
undefined
'
||
typeof
legacySetting
.
workspaceValue
!==
'
undefined
'
||
typeof
legacySetting
.
workspaceFolderValue
!==
'
undefined
'
)
{
}
else
if
(
typeof
legacySetting
.
user
!==
'
undefined
'
||
typeof
legacySetting
.
workspace
!==
'
undefined
'
||
typeof
legacySetting
.
workspaceFolder
!==
'
undefined
'
)
{
return
legacySetting
.
value
!
;
}
else
{
return
setting
.
default
Value
!
;
return
setting
.
default
!
;
}
}
src/vs/platform/configuration/common/configurationModels.ts
浏览文件 @
0ecc7452
...
...
@@ -384,22 +384,22 @@ export class Configuration {
const
value
=
consolidateConfigurationModel
.
getValue
<
C
>
(
key
);
return
{
defaultValue
,
userValue
,
userLocalValue
,
userRemoteValue
,
workspaceValue
,
workspaceFolderValue
,
memoryValue
,
default
:
default
Value
,
user
:
user
Value
,
userLocal
:
userLocal
Value
,
userRemote
:
userRemote
Value
,
workspace
:
workspace
Value
,
workspaceFolder
:
workspaceFolder
Value
,
memory
:
memory
Value
,
value
,
default
:
defaultValue
!==
undefined
?
{
value
:
this
.
_defaultConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
_defaultConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
user
:
userValue
!==
undefined
?
{
value
:
this
.
userConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
userConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
userLocal
:
userLocalValue
!==
undefined
?
{
value
:
this
.
localUserConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
localUserConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
userRemote
:
userRemoteValue
!==
undefined
?
{
value
:
this
.
remoteUserConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
remoteUserConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
workspace
:
workspaceValue
!==
undefined
?
{
value
:
this
.
_workspaceConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
_workspaceConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
workspaceFolder
:
workspaceFolderValue
!==
undefined
?
{
value
:
folderConfigurationModel
?.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
folderConfigurationModel
?.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
memory
:
memoryValue
!==
undefined
?
{
value
:
memoryConfigurationModel
.
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
memoryConfigurationModel
.
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
default
Target
:
defaultValue
!==
undefined
?
{
value
:
this
.
_defaultConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
_defaultConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
user
Target
:
userValue
!==
undefined
?
{
value
:
this
.
userConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
userConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
userLocal
Target
:
userLocalValue
!==
undefined
?
{
value
:
this
.
localUserConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
localUserConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
userRemote
Target
:
userRemoteValue
!==
undefined
?
{
value
:
this
.
remoteUserConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
remoteUserConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
workspace
Target
:
workspaceValue
!==
undefined
?
{
value
:
this
.
_workspaceConfiguration
.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
this
.
_workspaceConfiguration
.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
workspaceFolder
Target
:
workspaceFolderValue
!==
undefined
?
{
value
:
folderConfigurationModel
?.
freeze
().
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
folderConfigurationModel
?.
freeze
().
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
memory
Target
:
memoryValue
!==
undefined
?
{
value
:
memoryConfigurationModel
.
getValue
(
key
),
override
:
overrides
.
overrideIdentifier
?
memoryConfigurationModel
.
getOverrideValue
(
key
,
overrides
.
overrideIdentifier
)
:
undefined
}
:
undefined
,
};
}
...
...
src/vs/platform/configuration/test/common/testConfigurationService.ts
浏览文件 @
0ecc7452
...
...
@@ -60,8 +60,8 @@ export class TestConfigurationService implements IConfigurationService {
return
{
value
:
getConfigurationValue
<
T
>
(
config
,
key
),
default
Value
:
getConfigurationValue
<
T
>
(
config
,
key
),
user
Value
:
getConfigurationValue
<
T
>
(
config
,
key
)
default
:
getConfigurationValue
<
T
>
(
config
,
key
),
user
:
getConfigurationValue
<
T
>
(
config
,
key
)
};
}
...
...
src/vs/workbench/api/common/extHostConfiguration.ts
浏览文件 @
0ecc7452
...
...
@@ -204,10 +204,10 @@ export class ExtHostConfigProvider {
if
(
config
)
{
return
{
key
,
defaultValue
:
config
.
default
Value
,
globalValue
:
config
.
user
Value
,
workspaceValue
:
config
.
workspace
Value
,
workspaceFolderValue
:
config
.
workspaceFolder
Value
defaultValue
:
config
.
default
,
globalValue
:
config
.
user
,
workspaceValue
:
config
.
workspace
,
workspaceFolderValue
:
config
.
workspaceFolder
};
}
return
undefined
;
...
...
src/vs/workbench/browser/parts/editor/editorStatus.ts
浏览文件 @
0ecc7452
...
...
@@ -1158,12 +1158,12 @@ export class ChangeModeAction extends Action {
// If the association is already being made in the workspace, make sure to target workspace settings
let
target
=
ConfigurationTarget
.
USER
;
if
(
fileAssociationsConfig
.
workspace
Value
&&
!!
(
fileAssociationsConfig
.
workspaceValu
e
as
any
)[
associationKey
])
{
if
(
fileAssociationsConfig
.
workspace
&&
!!
(
fileAssociationsConfig
.
workspac
e
as
any
)[
associationKey
])
{
target
=
ConfigurationTarget
.
WORKSPACE
;
}
// Make sure to write into the value of the target and not the merged value from USER and WORKSPACE config
const
currentAssociations
=
deepClone
((
target
===
ConfigurationTarget
.
WORKSPACE
)
?
fileAssociationsConfig
.
workspace
Value
:
fileAssociationsConfig
.
userValue
)
||
Object
.
create
(
null
);
const
currentAssociations
=
deepClone
((
target
===
ConfigurationTarget
.
WORKSPACE
)
?
fileAssociationsConfig
.
workspace
:
fileAssociationsConfig
.
user
)
||
Object
.
create
(
null
);
currentAssociations
[
associationKey
]
=
language
.
id
;
this
.
configurationService
.
updateValue
(
FILES_ASSOCIATIONS_CONFIG
,
currentAssociations
,
target
);
...
...
src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts
浏览文件 @
0ecc7452
...
...
@@ -551,7 +551,7 @@ class Launch extends AbstractLaunch implements ILaunch {
}
protected
getConfig
():
IGlobalConfig
|
undefined
{
return
this
.
configurationService
.
inspect
<
IGlobalConfig
>
(
'
launch
'
,
{
resource
:
this
.
workspace
.
uri
}).
workspaceFolder
Value
;
return
this
.
configurationService
.
inspect
<
IGlobalConfig
>
(
'
launch
'
,
{
resource
:
this
.
workspace
.
uri
}).
workspaceFolder
;
}
async
openConfigFile
(
sideBySide
:
boolean
,
preserveFocus
:
boolean
,
type
?:
string
,
token
?:
CancellationToken
):
Promise
<
{
editor
:
IEditor
|
null
,
created
:
boolean
}
>
{
...
...
@@ -631,7 +631,7 @@ class WorkspaceLaunch extends AbstractLaunch implements ILaunch {
}
protected
getConfig
():
IGlobalConfig
|
undefined
{
return
this
.
configurationService
.
inspect
<
IGlobalConfig
>
(
'
launch
'
).
workspace
Value
;
return
this
.
configurationService
.
inspect
<
IGlobalConfig
>
(
'
launch
'
).
workspace
;
}
async
openConfigFile
(
sideBySide
:
boolean
,
preserveFocus
:
boolean
):
Promise
<
{
editor
:
IEditor
|
null
,
created
:
boolean
}
>
{
...
...
@@ -674,7 +674,7 @@ class UserLaunch extends AbstractLaunch implements ILaunch {
}
protected
getConfig
():
IGlobalConfig
|
undefined
{
return
this
.
configurationService
.
inspect
<
IGlobalConfig
>
(
'
launch
'
).
user
Value
;
return
this
.
configurationService
.
inspect
<
IGlobalConfig
>
(
'
launch
'
).
user
;
}
async
openConfigFile
(
_
:
boolean
,
preserveFocus
:
boolean
):
Promise
<
{
editor
:
IEditor
|
null
,
created
:
boolean
}
>
{
...
...
src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
浏览文件 @
0ecc7452
...
...
@@ -1379,7 +1379,7 @@ export class SetColorThemeAction extends ExtensionAction {
ignoreFocusLost
});
let
confValue
=
this
.
configurationService
.
inspect
(
COLOR_THEME_SETTING
);
const
target
=
typeof
confValue
.
workspace
Value
!==
'
undefined
'
?
ConfigurationTarget
.
WORKSPACE
:
ConfigurationTarget
.
USER
;
const
target
=
typeof
confValue
.
workspace
!==
'
undefined
'
?
ConfigurationTarget
.
WORKSPACE
:
ConfigurationTarget
.
USER
;
return
this
.
workbenchThemeService
.
setColorTheme
(
pickedTheme
?
pickedTheme
.
id
:
currentTheme
.
id
,
target
);
}
}
...
...
@@ -1445,7 +1445,7 @@ export class SetFileIconThemeAction extends ExtensionAction {
ignoreFocusLost
});
let
confValue
=
this
.
configurationService
.
inspect
(
ICON_THEME_SETTING
);
const
target
=
typeof
confValue
.
workspace
Value
!==
'
undefined
'
?
ConfigurationTarget
.
WORKSPACE
:
ConfigurationTarget
.
USER
;
const
target
=
typeof
confValue
.
workspace
!==
'
undefined
'
?
ConfigurationTarget
.
WORKSPACE
:
ConfigurationTarget
.
USER
;
return
this
.
workbenchThemeService
.
setFileIconTheme
(
pickedTheme
?
pickedTheme
.
id
:
currentTheme
.
id
,
target
);
}
}
...
...
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
浏览文件 @
0ecc7452
...
...
@@ -799,7 +799,7 @@ export class SettingsEditor2 extends BaseEditor {
// If the user is changing the value back to the default, do a 'reset' instead
const
inspected
=
this
.
configurationService
.
inspect
(
key
,
overrides
);
if
(
inspected
.
default
Value
===
value
)
{
if
(
inspected
.
default
===
value
)
{
value
=
undefined
;
}
...
...
src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts
浏览文件 @
0ecc7452
...
...
@@ -155,23 +155,23 @@ export class SettingsTreeSettingElement extends SettingsTreeElement {
update
(
inspectResult
:
IInspectResult
):
void
{
const
{
isConfigured
,
inspected
,
targetSelector
}
=
inspectResult
;
const
displayValue
=
isConfigured
?
inspected
[
targetSelector
]
:
inspected
.
default
Value
;
const
displayValue
=
isConfigured
?
inspected
[
targetSelector
]
:
inspected
.
default
;
const
overriddenScopeList
:
string
[]
=
[];
if
(
targetSelector
!==
'
workspace
'
&&
typeof
inspected
.
workspace
Value
!==
'
undefined
'
)
{
if
(
targetSelector
!==
'
workspace
'
&&
typeof
inspected
.
workspace
!==
'
undefined
'
)
{
overriddenScopeList
.
push
(
localize
(
'
workspace
'
,
"
Workspace
"
));
}
if
(
targetSelector
!==
'
userRemote
'
&&
typeof
inspected
.
userRemote
Value
!==
'
undefined
'
)
{
if
(
targetSelector
!==
'
userRemote
'
&&
typeof
inspected
.
userRemote
!==
'
undefined
'
)
{
overriddenScopeList
.
push
(
localize
(
'
remote
'
,
"
Remote
"
));
}
if
(
targetSelector
!==
'
userLocal
'
&&
typeof
inspected
.
userLocal
Value
!==
'
undefined
'
)
{
if
(
targetSelector
!==
'
userLocal
'
&&
typeof
inspected
.
userLocal
!==
'
undefined
'
)
{
overriddenScopeList
.
push
(
localize
(
'
user
'
,
"
User
"
));
}
this
.
value
=
displayValue
;
this
.
scopeValue
=
isConfigured
&&
inspected
[
targetSelector
];
this
.
defaultValue
=
inspected
.
default
Value
;
this
.
defaultValue
=
inspected
.
default
;
this
.
isConfigured
=
isConfigured
;
if
(
isConfigured
||
this
.
setting
.
tags
||
this
.
tags
)
{
...
...
src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
浏览文件 @
0ecc7452
...
...
@@ -1667,7 +1667,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
if
(
this
.
executionEngine
===
ExecutionEngine
.
Process
)
{
return
this
.
emptyWorkspaceTaskResults
(
workspaceFolder
);
}
const
configuration
=
this
.
testParseExternalConfig
(
this
.
configurationService
.
inspect
<
TaskConfig
.
ExternalTaskRunnerConfiguration
>
(
'
tasks
'
).
workspace
Value
,
nls
.
localize
(
'
TasksSystem.locationWorkspaceConfig
'
,
'
workspace file
'
));
const
configuration
=
this
.
testParseExternalConfig
(
this
.
configurationService
.
inspect
<
TaskConfig
.
ExternalTaskRunnerConfiguration
>
(
'
tasks
'
).
workspace
,
nls
.
localize
(
'
TasksSystem.locationWorkspaceConfig
'
,
'
workspace file
'
));
let
customizedTasks
:
{
byIdentifier
:
IStringDictionary
<
ConfiguringTask
>
;
}
=
{
byIdentifier
:
Object
.
create
(
null
)
};
...
...
@@ -1686,7 +1686,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
if
(
this
.
executionEngine
===
ExecutionEngine
.
Process
)
{
return
this
.
emptyWorkspaceTaskResults
(
workspaceFolder
);
}
const
configuration
=
this
.
testParseExternalConfig
(
this
.
configurationService
.
inspect
<
TaskConfig
.
ExternalTaskRunnerConfiguration
>
(
'
tasks
'
).
user
Value
,
nls
.
localize
(
'
TasksSystem.locationUserConfig
'
,
'
user settings
'
));
const
configuration
=
this
.
testParseExternalConfig
(
this
.
configurationService
.
inspect
<
TaskConfig
.
ExternalTaskRunnerConfiguration
>
(
'
tasks
'
).
user
,
nls
.
localize
(
'
TasksSystem.locationUserConfig
'
,
'
user settings
'
));
let
customizedTasks
:
{
byIdentifier
:
IStringDictionary
<
ConfiguringTask
>
;
}
=
{
byIdentifier
:
Object
.
create
(
null
)
};
...
...
@@ -1789,7 +1789,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
protected
getConfiguration
(
workspaceFolder
:
IWorkspaceFolder
):
{
config
:
TaskConfig
.
ExternalTaskRunnerConfiguration
|
undefined
;
hasParseErrors
:
boolean
}
{
let
result
=
this
.
contextService
.
getWorkbenchState
()
!==
WorkbenchState
.
EMPTY
?
Objects
.
deepClone
(
this
.
configurationService
.
inspect
<
TaskConfig
.
ExternalTaskRunnerConfiguration
>
(
'
tasks
'
,
{
resource
:
workspaceFolder
.
uri
}).
workspaceFolder
Value
)
?
Objects
.
deepClone
(
this
.
configurationService
.
inspect
<
TaskConfig
.
ExternalTaskRunnerConfiguration
>
(
'
tasks
'
,
{
resource
:
workspaceFolder
.
uri
}).
workspaceFolder
)
:
undefined
;
if
(
!
result
)
{
return
{
config
:
undefined
,
hasParseErrors
:
false
};
...
...
src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts
浏览文件 @
0ecc7452
...
...
@@ -196,13 +196,13 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper {
// Check if workspace setting exists and whether it's whitelisted
let
isWorkspaceShellAllowed
:
boolean
|
undefined
=
false
;
if
(
shellConfigValue
.
workspace
Value
!==
undefined
||
shellArgsConfigValue
.
workspaceValue
!==
undefined
||
envConfigValue
.
workspaceValu
e
!==
undefined
)
{
if
(
shellConfigValue
.
workspace
!==
undefined
||
shellArgsConfigValue
.
workspace
!==
undefined
||
envConfigValue
.
workspac
e
!==
undefined
)
{
isWorkspaceShellAllowed
=
this
.
isWorkspaceShellAllowed
(
undefined
);
}
// Always allow [] args as it would lead to an odd error message and should not be dangerous
if
(
shellConfigValue
.
workspace
Value
===
undefined
&&
envConfigValue
.
workspaceValu
e
===
undefined
&&
shellArgsConfigValue
.
workspace
Value
&&
shellArgsConfigValue
.
workspaceValu
e
.
length
===
0
)
{
if
(
shellConfigValue
.
workspace
===
undefined
&&
envConfigValue
.
workspac
e
===
undefined
&&
shellArgsConfigValue
.
workspace
&&
shellArgsConfigValue
.
workspac
e
.
length
===
0
)
{
isWorkspaceShellAllowed
=
true
;
}
...
...
@@ -210,16 +210,16 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper {
// permission
if
(
isWorkspaceShellAllowed
===
undefined
)
{
let
shellString
:
string
|
undefined
;
if
(
shellConfigValue
.
workspace
Value
)
{
shellString
=
`shell: "
${
shellConfigValue
.
workspace
Value
}
"`
;
if
(
shellConfigValue
.
workspace
)
{
shellString
=
`shell: "
${
shellConfigValue
.
workspace
}
"`
;
}
let
argsString
:
string
|
undefined
;
if
(
shellArgsConfigValue
.
workspace
Value
)
{
argsString
=
`shellArgs: [
${
shellArgsConfigValue
.
workspace
Value
.
map
(
v
=>
'
"
'
+
v
+
'
"
'
).
join
(
'
,
'
)}
]`
;
if
(
shellArgsConfigValue
.
workspace
)
{
argsString
=
`shellArgs: [
${
shellArgsConfigValue
.
workspace
.
map
(
v
=>
'
"
'
+
v
+
'
"
'
).
join
(
'
,
'
)}
]`
;
}
let
envString
:
string
|
undefined
;
if
(
envConfigValue
.
workspace
Value
)
{
envString
=
`env: {
${
Object
.
keys
(
envConfigValue
.
workspace
Value
).
map
(
k
=>
`
${
k
}
:
${
envConfigValue
.
workspaceValu
e
!
[
k
]}
`
).
join
(
'
,
'
)}
}`
;
if
(
envConfigValue
.
workspace
)
{
envString
=
`env: {
${
Object
.
keys
(
envConfigValue
.
workspace
).
map
(
k
=>
`
${
k
}
:
${
envConfigValue
.
workspac
e
!
[
k
]}
`
).
join
(
'
,
'
)}
}`
;
}
// Should not be localized as it's json-like syntax referencing settings keys
const
workspaceConfigStrings
:
string
[]
=
[];
...
...
src/vs/workbench/contrib/themes/browser/themes.contribution.ts
浏览文件 @
0ecc7452
...
...
@@ -63,7 +63,7 @@ export class SelectColorThemeAction extends Action {
let
target
:
ConfigurationTarget
|
undefined
=
undefined
;
if
(
applyTheme
)
{
const
confValue
=
this
.
configurationService
.
inspect
(
COLOR_THEME_SETTING
);
target
=
typeof
confValue
.
workspace
Value
!==
'
undefined
'
?
ConfigurationTarget
.
WORKSPACE
:
ConfigurationTarget
.
USER
;
target
=
typeof
confValue
.
workspace
!==
'
undefined
'
?
ConfigurationTarget
.
WORKSPACE
:
ConfigurationTarget
.
USER
;
}
this
.
themeService
.
setColorTheme
(
themeId
,
target
).
then
(
undefined
,
...
...
@@ -148,7 +148,7 @@ class SelectIconThemeAction extends Action {
let
target
:
ConfigurationTarget
|
undefined
=
undefined
;
if
(
applyTheme
)
{
const
confValue
=
this
.
configurationService
.
inspect
(
ICON_THEME_SETTING
);
target
=
typeof
confValue
.
workspace
Value
!==
'
undefined
'
?
ConfigurationTarget
.
WORKSPACE
:
ConfigurationTarget
.
USER
;
target
=
typeof
confValue
.
workspace
!==
'
undefined
'
?
ConfigurationTarget
.
WORKSPACE
:
ConfigurationTarget
.
USER
;
}
this
.
themeService
.
setFileIconTheme
(
themeId
,
target
).
then
(
undefined
,
err
=>
{
...
...
src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts
浏览文件 @
0ecc7452
...
...
@@ -108,7 +108,7 @@ export class WelcomePageContribution implements IWorkbenchContribution {
function
isWelcomePageEnabled
(
configurationService
:
IConfigurationService
,
contextService
:
IWorkspaceContextService
)
{
const
startupEditor
=
configurationService
.
inspect
(
configurationKey
);
if
(
!
startupEditor
.
user
Value
&&
!
startupEditor
.
workspaceValu
e
)
{
if
(
!
startupEditor
.
user
&&
!
startupEditor
.
workspac
e
)
{
const
welcomeEnabled
=
configurationService
.
inspect
(
oldConfigurationKey
);
if
(
welcomeEnabled
.
value
!==
undefined
&&
welcomeEnabled
.
value
!==
null
)
{
return
welcomeEnabled
.
value
;
...
...
src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts
浏览文件 @
0ecc7452
...
...
@@ -950,27 +950,27 @@ suite('WorkspaceConfigurationService - Folder', () => {
test
(
'
inspect
'
,
()
=>
{
let
actual
=
testObject
.
inspect
(
'
something.missing
'
);
assert
.
equal
(
actual
.
default
Value
,
undefined
);
assert
.
equal
(
actual
.
user
Value
,
undefined
);
assert
.
equal
(
actual
.
workspace
Value
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
undefined
);
assert
.
equal
(
actual
.
default
,
undefined
);
assert
.
equal
(
actual
.
user
,
undefined
);
assert
.
equal
(
actual
.
workspace
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
,
undefined
);
assert
.
equal
(
actual
.
value
,
undefined
);
actual
=
testObject
.
inspect
(
'
configurationService.folder.testSetting
'
);
assert
.
equal
(
actual
.
default
Value
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
Value
,
undefined
);
assert
.
equal
(
actual
.
workspace
Value
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
undefined
);
assert
.
equal
(
actual
.
default
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
,
undefined
);
assert
.
equal
(
actual
.
workspace
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
,
undefined
);
assert
.
equal
(
actual
.
value
,
'
isSet
'
);
fs
.
writeFileSync
(
globalSettingsFile
,
'
{ "configurationService.folder.testSetting": "userValue" }
'
);
return
testObject
.
reloadConfiguration
()
.
then
(()
=>
{
actual
=
testObject
.
inspect
(
'
configurationService.folder.testSetting
'
);
assert
.
equal
(
actual
.
default
Value
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
Value
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
Value
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
undefined
);
assert
.
equal
(
actual
.
default
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
,
undefined
);
assert
.
equal
(
actual
.
value
,
'
userValue
'
);
fs
.
writeFileSync
(
path
.
join
(
workspaceDir
,
'
.vscode
'
,
'
settings.json
'
),
'
{ "configurationService.folder.testSetting": "workspaceValue" }
'
);
...
...
@@ -978,10 +978,10 @@ suite('WorkspaceConfigurationService - Folder', () => {
return
testObject
.
reloadConfiguration
()
.
then
(()
=>
{
actual
=
testObject
.
inspect
(
'
configurationService.folder.testSetting
'
);
assert
.
equal
(
actual
.
default
Value
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
Value
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
Value
,
'
workspaceValue
'
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
undefined
);
assert
.
equal
(
actual
.
default
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
,
'
workspaceValue
'
);
assert
.
equal
(
actual
.
workspaceFolder
,
undefined
);
assert
.
equal
(
actual
.
value
,
'
workspaceValue
'
);
});
});
...
...
@@ -1308,37 +1308,37 @@ suite('WorkspaceConfigurationService-Multiroot', () => {
test
(
'
inspect
'
,
()
=>
{
let
actual
=
testObject
.
inspect
(
'
something.missing
'
);
assert
.
equal
(
actual
.
default
Value
,
undefined
);
assert
.
equal
(
actual
.
user
Value
,
undefined
);
assert
.
equal
(
actual
.
workspace
Value
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
undefined
);
assert
.
equal
(
actual
.
default
,
undefined
);
assert
.
equal
(
actual
.
user
,
undefined
);
assert
.
equal
(
actual
.
workspace
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
,
undefined
);
assert
.
equal
(
actual
.
value
,
undefined
);
actual
=
testObject
.
inspect
(
'
configurationService.workspace.testResourceSetting
'
);
assert
.
equal
(
actual
.
default
Value
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
Value
,
undefined
);
assert
.
equal
(
actual
.
workspace
Value
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
undefined
);
assert
.
equal
(
actual
.
default
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
,
undefined
);
assert
.
equal
(
actual
.
workspace
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
,
undefined
);
assert
.
equal
(
actual
.
value
,
'
isSet
'
);
fs
.
writeFileSync
(
globalSettingsFile
,
'
{ "configurationService.workspace.testResourceSetting": "userValue" }
'
);
return
testObject
.
reloadConfiguration
()
.
then
(()
=>
{
actual
=
testObject
.
inspect
(
'
configurationService.workspace.testResourceSetting
'
);
assert
.
equal
(
actual
.
default
Value
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
Value
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
Value
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
undefined
);
assert
.
equal
(
actual
.
default
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
,
undefined
);
assert
.
equal
(
actual
.
workspaceFolder
,
undefined
);
assert
.
equal
(
actual
.
value
,
'
userValue
'
);
return
jsonEditingServce
.
write
(
workspaceContextService
.
getWorkspace
().
configuration
!
,
[{
key
:
'
settings
'
,
value
:
{
'
configurationService.workspace.testResourceSetting
'
:
'
workspaceValue
'
}
}],
true
)
.
then
(()
=>
testObject
.
reloadConfiguration
())
.
then
(()
=>
{
actual
=
testObject
.
inspect
(
'
configurationService.workspace.testResourceSetting
'
);
assert
.
equal
(
actual
.
default
Value
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
Value
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
Value
,
'
workspaceValue
'
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
undefined
);
assert
.
equal
(
actual
.
default
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
,
'
workspaceValue
'
);
assert
.
equal
(
actual
.
workspaceFolder
,
undefined
);
assert
.
equal
(
actual
.
value
,
'
workspaceValue
'
);
fs
.
writeFileSync
(
workspaceContextService
.
getWorkspace
().
folders
[
0
].
toResource
(
'
.vscode/settings.json
'
).
fsPath
,
'
{ "configurationService.workspace.testResourceSetting": "workspaceFolderValue" }
'
);
...
...
@@ -1346,10 +1346,10 @@ suite('WorkspaceConfigurationService-Multiroot', () => {
return
testObject
.
reloadConfiguration
()
.
then
(()
=>
{
actual
=
testObject
.
inspect
(
'
configurationService.workspace.testResourceSetting
'
,
{
resource
:
workspaceContextService
.
getWorkspace
().
folders
[
0
].
uri
});
assert
.
equal
(
actual
.
default
Value
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
Value
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
Value
,
'
workspaceValue
'
);
assert
.
equal
(
actual
.
workspaceFolder
Value
,
'
workspaceFolderValue
'
);
assert
.
equal
(
actual
.
default
,
'
isSet
'
);
assert
.
equal
(
actual
.
user
,
'
userValue
'
);
assert
.
equal
(
actual
.
workspace
,
'
workspaceValue
'
);
assert
.
equal
(
actual
.
workspaceFolder
,
'
workspaceFolderValue
'
);
assert
.
equal
(
actual
.
value
,
'
workspaceFolderValue
'
);
});
});
...
...
@@ -1401,7 +1401,7 @@ suite('WorkspaceConfigurationService-Multiroot', () => {
return
jsonEditingServce
.
write
(
workspaceContextService
.
getWorkspace
().
configuration
!
,
[{
key
:
'
launch
'
,
value
:
expectedLaunchConfiguration
}],
true
)
.
then
(()
=>
testObject
.
reloadConfiguration
())
.
then
(()
=>
{
const
actual
=
testObject
.
inspect
(
'
launch
'
).
workspace
Value
;
const
actual
=
testObject
.
inspect
(
'
launch
'
).
workspace
;
assert
.
deepEqual
(
actual
,
expectedLaunchConfiguration
);
});
});
...
...
@@ -1448,7 +1448,7 @@ suite('WorkspaceConfigurationService-Multiroot', () => {
return
jsonEditingServce
.
write
(
workspaceContextService
.
getWorkspace
().
configuration
!
,
[{
key
:
'
tasks
'
,
value
:
expectedTasksConfiguration
}],
true
)
.
then
(()
=>
testObject
.
reloadConfiguration
())
.
then
(()
=>
{
const
actual
=
testObject
.
inspect
(
'
tasks
'
).
workspace
Value
;
const
actual
=
testObject
.
inspect
(
'
tasks
'
).
workspace
;
assert
.
deepEqual
(
actual
,
expectedTasksConfiguration
);
});
});
...
...
src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.ts
浏览文件 @
0ecc7452
...
...
@@ -184,9 +184,9 @@ export class FilesConfigurationService extends Disposable implements IFilesConfi
async
toggleAutoSave
():
Promise
<
void
>
{
const
setting
=
this
.
configurationService
.
inspect
(
'
files.autoSave
'
);
let
userAutoSaveConfig
=
setting
.
user
Value
;
let
userAutoSaveConfig
=
setting
.
user
;
if
(
isUndefinedOrNull
(
userAutoSaveConfig
))
{
userAutoSaveConfig
=
setting
.
default
Value
;
// use default if setting not defined
userAutoSaveConfig
=
setting
.
default
;
// use default if setting not defined
}
let
newAutoSaveValue
:
string
;
...
...
src/vs/workbench/services/themes/browser/workbenchThemeService.ts
浏览文件 @
0ecc7452
...
...
@@ -580,9 +580,9 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
public
writeConfiguration
(
key
:
string
,
value
:
any
,
settingsTarget
:
ConfigurationTarget
|
'
auto
'
):
Promise
<
void
>
{
let
settings
=
this
.
configurationService
.
inspect
(
key
);
if
(
settingsTarget
===
'
auto
'
)
{
if
(
!
types
.
isUndefined
(
settings
.
workspaceFolder
Value
))
{
if
(
!
types
.
isUndefined
(
settings
.
workspaceFolder
))
{
settingsTarget
=
ConfigurationTarget
.
WORKSPACE_FOLDER
;
}
else
if
(
!
types
.
isUndefined
(
settings
.
workspace
Value
))
{
}
else
if
(
!
types
.
isUndefined
(
settings
.
workspace
))
{
settingsTarget
=
ConfigurationTarget
.
WORKSPACE
;
}
else
{
settingsTarget
=
ConfigurationTarget
.
USER
;
...
...
@@ -590,10 +590,10 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
}
if
(
settingsTarget
===
ConfigurationTarget
.
USER
)
{
if
(
value
===
settings
.
user
Value
)
{
if
(
value
===
settings
.
user
)
{
return
Promise
.
resolve
(
undefined
);
// nothing to do
}
else
if
(
value
===
settings
.
default
Value
)
{
if
(
types
.
isUndefined
(
settings
.
user
Value
))
{
}
else
if
(
value
===
settings
.
default
)
{
if
(
types
.
isUndefined
(
settings
.
user
))
{
return
Promise
.
resolve
(
undefined
);
// nothing to do
}
value
=
undefined
;
// remove configuration from user settings
...
...
src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.ts
浏览文件 @
0ecc7452
...
...
@@ -309,7 +309,7 @@ export abstract class AbstractWorkspaceEditingService implements IWorkspaceEditi
continue
;
}
targetWorkspaceConfiguration
[
key
]
=
this
.
configurationService
.
inspect
(
key
).
workspace
Value
;
targetWorkspaceConfiguration
[
key
]
=
this
.
configurationService
.
inspect
(
key
).
workspace
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录