Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
fd42d991
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,发现更多精彩内容 >>
提交
fd42d991
编写于
10月 18, 2017
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💄
上级
91b9b413
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
23 deletion
+23
-23
src/vs/platform/configuration/common/configuration.ts
src/vs/platform/configuration/common/configuration.ts
+10
-10
src/vs/platform/configuration/common/configurationModels.ts
src/vs/platform/configuration/common/configurationModels.ts
+7
-7
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+3
-3
src/vs/workbench/services/configuration/common/configurationModels.ts
...ench/services/configuration/common/configurationModels.ts
+3
-3
未找到文件。
src/vs/platform/configuration/common/configuration.ts
浏览文件 @
fd42d991
...
@@ -37,17 +37,17 @@ export enum ConfigurationTarget {
...
@@ -37,17 +37,17 @@ export enum ConfigurationTarget {
}
}
export
interface
IConfigurationChangeEvent
{
export
interface
IConfigurationChangeEvent
{
affectedKeys
:
string
[];
source
:
ConfigurationTarget
;
affectedKeys
:
string
[];
affectsConfiguration
(
configuration
:
string
,
resource
?:
URI
):
boolean
;
affectsConfiguration
(
configuration
:
string
,
resource
?:
URI
):
boolean
;
// Following data is used for telemetry
// Following data is used for telemetry
source
:
ConfigurationTarget
;
sourceConfig
:
any
;
sourceConfig
:
any
;
// Following data is used for Extension host configuration event
// Following data is used for Extension host configuration event
changedConfiguration
:
IConfiguraionModel
;
changedConfiguration
:
IConfigura
t
ionModel
;
changedConfigurationByResource
:
StrictResourceMap
<
IConfiguraionModel
>
;
changedConfigurationByResource
:
StrictResourceMap
<
IConfigura
t
ionModel
>
;
}
}
export
interface
IConfigurationService
{
export
interface
IConfigurationService
{
...
@@ -90,7 +90,7 @@ export interface IConfigurationService {
...
@@ -90,7 +90,7 @@ export interface IConfigurationService {
};
};
}
}
export
interface
IConfiguraionModel
{
export
interface
IConfigura
t
ionModel
{
contents
:
any
;
contents
:
any
;
keys
:
string
[];
keys
:
string
[];
overrides
:
IOverrides
[];
overrides
:
IOverrides
[];
...
@@ -102,13 +102,13 @@ export interface IOverrides {
...
@@ -102,13 +102,13 @@ export interface IOverrides {
}
}
export
interface
IConfigurationData
{
export
interface
IConfigurationData
{
defaults
:
IConfiguraionModel
;
defaults
:
IConfigura
t
ionModel
;
user
:
IConfiguraionModel
;
user
:
IConfigura
t
ionModel
;
workspace
:
IConfiguraionModel
;
workspace
:
IConfigura
t
ionModel
;
folders
:
{
[
folder
:
string
]:
IConfiguraionModel
};
folders
:
{
[
folder
:
string
]:
IConfigura
t
ionModel
};
}
}
export
function
compare
(
from
:
IConfigura
ionModel
,
to
:
IConfigura
ionModel
):
{
added
:
string
[],
removed
:
string
[],
updated
:
string
[]
}
{
export
function
compare
(
from
:
IConfigura
tionModel
,
to
:
IConfigurat
ionModel
):
{
added
:
string
[],
removed
:
string
[],
updated
:
string
[]
}
{
const
added
=
to
.
keys
.
filter
(
key
=>
from
.
keys
.
indexOf
(
key
)
===
-
1
);
const
added
=
to
.
keys
.
filter
(
key
=>
from
.
keys
.
indexOf
(
key
)
===
-
1
);
const
removed
=
from
.
keys
.
filter
(
key
=>
to
.
keys
.
indexOf
(
key
)
===
-
1
);
const
removed
=
from
.
keys
.
filter
(
key
=>
to
.
keys
.
indexOf
(
key
)
===
-
1
);
const
updated
=
[];
const
updated
=
[];
...
...
src/vs/platform/configuration/common/configurationModels.ts
浏览文件 @
fd42d991
...
@@ -11,10 +11,10 @@ import * as objects from 'vs/base/common/objects';
...
@@ -11,10 +11,10 @@ import * as objects from 'vs/base/common/objects';
import
URI
from
'
vs/base/common/uri
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IConfigurationRegistry
,
Extensions
,
OVERRIDE_PROPERTY_PATTERN
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
IConfigurationRegistry
,
Extensions
,
OVERRIDE_PROPERTY_PATTERN
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
IOverrides
,
overrideIdentifierFromKey
,
addToValueTree
,
toValuesTree
,
IConfiguraionModel
,
merge
,
getConfigurationValue
,
IConfigurationOverrides
,
IConfigurationData
,
getDefaultValues
,
getConfigurationKeys
,
IConfigurationChangeEvent
,
ConfigurationTarget
,
removeFromValueTree
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IOverrides
,
overrideIdentifierFromKey
,
addToValueTree
,
toValuesTree
,
IConfigura
t
ionModel
,
merge
,
getConfigurationValue
,
IConfigurationOverrides
,
IConfigurationData
,
getDefaultValues
,
getConfigurationKeys
,
IConfigurationChangeEvent
,
ConfigurationTarget
,
removeFromValueTree
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
Workspace
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
Workspace
}
from
'
vs/platform/workspace/common/workspace
'
;
export
class
ConfigurationModel
implements
IConfiguraionModel
{
export
class
ConfigurationModel
implements
IConfigura
t
ionModel
{
constructor
(
protected
_contents
:
any
=
{},
protected
_keys
:
string
[]
=
[],
protected
_overrides
:
IOverrides
[]
=
[])
{
constructor
(
protected
_contents
:
any
=
{},
protected
_keys
:
string
[]
=
[],
protected
_overrides
:
IOverrides
[]
=
[])
{
}
}
...
@@ -134,7 +134,7 @@ export class ConfigurationModel implements IConfiguraionModel {
...
@@ -134,7 +134,7 @@ export class ConfigurationModel implements IConfiguraionModel {
return
false
;
return
false
;
}
}
toJSON
():
IConfiguraionModel
{
toJSON
():
IConfigura
t
ionModel
{
return
{
return
{
contents
:
this
.
contents
,
contents
:
this
.
contents
,
overrides
:
this
.
overrides
,
overrides
:
this
.
overrides
,
...
@@ -458,7 +458,7 @@ export class Configuration {
...
@@ -458,7 +458,7 @@ export class Configuration {
return
new
Configuration
(
defaultConfiguration
,
userConfiguration
,
workspaceConfiguration
,
folders
,
new
ConfigurationModel
(),
new
StrictResourceMap
<
ConfigurationModel
>
(),
workspace
);
return
new
Configuration
(
defaultConfiguration
,
userConfiguration
,
workspaceConfiguration
,
folders
,
new
ConfigurationModel
(),
new
StrictResourceMap
<
ConfigurationModel
>
(),
workspace
);
}
}
private
static
parseConfigurationModel
(
model
:
IConfiguraionModel
):
ConfigurationModel
{
private
static
parseConfigurationModel
(
model
:
IConfigura
t
ionModel
):
ConfigurationModel
{
return
new
ConfigurationModel
(
model
.
contents
,
model
.
keys
,
model
.
overrides
);
return
new
ConfigurationModel
(
model
.
contents
,
model
.
keys
,
model
.
overrides
);
}
}
}
}
...
@@ -501,7 +501,7 @@ export class AllKeysConfigurationChangeEvent extends AbstractConfigurationChange
...
@@ -501,7 +501,7 @@ export class AllKeysConfigurationChangeEvent extends AbstractConfigurationChange
return
this
.
_changedConfiguration
;
return
this
.
_changedConfiguration
;
}
}
get
changedConfigurationByResource
():
StrictResourceMap
<
IConfiguraionModel
>
{
get
changedConfigurationByResource
():
StrictResourceMap
<
IConfigura
t
ionModel
>
{
return
new
StrictResourceMap
();
return
new
StrictResourceMap
();
}
}
...
@@ -521,11 +521,11 @@ export class ConfigurationChangeEvent extends AbstractConfigurationChangeEvent i
...
@@ -521,11 +521,11 @@ export class ConfigurationChangeEvent extends AbstractConfigurationChangeEvent i
super
();
super
();
}
}
get
changedConfiguration
():
IConfiguraionModel
{
get
changedConfiguration
():
IConfigura
t
ionModel
{
return
this
.
_changedConfiguration
;
return
this
.
_changedConfiguration
;
}
}
get
changedConfigurationByResource
():
StrictResourceMap
<
IConfiguraionModel
>
{
get
changedConfigurationByResource
():
StrictResourceMap
<
IConfigura
t
ionModel
>
{
return
this
.
_changedConfigurationByResource
;
return
this
.
_changedConfigurationByResource
;
}
}
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
fd42d991
...
@@ -28,7 +28,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon';
...
@@ -28,7 +28,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon';
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
{
ITextSource
}
from
'
vs/editor/common/model/textSource
'
;
import
{
ITextSource
}
from
'
vs/editor/common/model/textSource
'
;
import
{
IConfigurationData
,
ConfigurationTarget
,
IConfiguraionModel
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationData
,
ConfigurationTarget
,
IConfigura
t
ionModel
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IPickOpenEntry
,
IPickOptions
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
IPickOpenEntry
,
IPickOptions
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
SaveReason
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
SaveReason
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
...
@@ -78,8 +78,8 @@ export interface IInitData {
...
@@ -78,8 +78,8 @@ export interface IInitData {
}
}
export
interface
IWorkspaceConfigurationChangeEventData
{
export
interface
IWorkspaceConfigurationChangeEventData
{
changedConfiguration
:
IConfiguraionModel
;
changedConfiguration
:
IConfigura
t
ionModel
;
changedConfigurationByResource
:
{
[
folder
:
string
]:
IConfiguraionModel
};
changedConfigurationByResource
:
{
[
folder
:
string
]:
IConfigura
t
ionModel
};
}
}
export
interface
IExtHostContext
{
export
interface
IExtHostContext
{
...
...
src/vs/workbench/services/configuration/common/configurationModels.ts
浏览文件 @
fd42d991
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
'
use strict
'
;
'
use strict
'
;
import
{
clone
,
equals
}
from
'
vs/base/common/objects
'
;
import
{
clone
,
equals
}
from
'
vs/base/common/objects
'
;
import
{
compare
,
toValuesTree
,
IConfigurationChangeEvent
,
ConfigurationTarget
,
IConfiguraionModel
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
compare
,
toValuesTree
,
IConfigurationChangeEvent
,
ConfigurationTarget
,
IConfigura
t
ionModel
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ConfigurationModel
,
Configuration
as
BaseConfiguration
,
CustomConfigurationModel
,
ConfigurationChangeEvent
}
from
'
vs/platform/configuration/common/configurationModels
'
;
import
{
ConfigurationModel
,
Configuration
as
BaseConfiguration
,
CustomConfigurationModel
,
ConfigurationChangeEvent
}
from
'
vs/platform/configuration/common/configurationModels
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IConfigurationRegistry
,
IConfigurationPropertySchema
,
Extensions
,
ConfigurationScope
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
IConfigurationRegistry
,
IConfigurationPropertySchema
,
Extensions
,
ConfigurationScope
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
...
@@ -272,11 +272,11 @@ export class WorkspaceConfigurationChangeEvent implements IConfigurationChangeEv
...
@@ -272,11 +272,11 @@ export class WorkspaceConfigurationChangeEvent implements IConfigurationChangeEv
constructor
(
private
configurationChangeEvent
:
IConfigurationChangeEvent
,
private
workspace
:
Workspace
)
{
}
constructor
(
private
configurationChangeEvent
:
IConfigurationChangeEvent
,
private
workspace
:
Workspace
)
{
}
get
changedConfiguration
():
IConfiguraionModel
{
get
changedConfiguration
():
IConfigura
t
ionModel
{
return
this
.
configurationChangeEvent
.
changedConfiguration
;
return
this
.
configurationChangeEvent
.
changedConfiguration
;
}
}
get
changedConfigurationByResource
():
StrictResourceMap
<
IConfiguraionModel
>
{
get
changedConfigurationByResource
():
StrictResourceMap
<
IConfigura
t
ionModel
>
{
return
this
.
configurationChangeEvent
.
changedConfigurationByResource
;
return
this
.
configurationChangeEvent
.
changedConfigurationByResource
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录