Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
8977893b
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,发现更多精彩内容 >>
提交
8977893b
编写于
6月 19, 2017
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up
上级
dfc46d75
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
16 deletion
+17
-16
src/vs/editor/common/services/modelServiceImpl.ts
src/vs/editor/common/services/modelServiceImpl.ts
+1
-1
src/vs/editor/common/services/resourceConfigurationImpl.ts
src/vs/editor/common/services/resourceConfigurationImpl.ts
+1
-1
src/vs/platform/configuration/common/configuration.ts
src/vs/platform/configuration/common/configuration.ts
+9
-8
src/vs/platform/configuration/node/configurationService.ts
src/vs/platform/configuration/node/configurationService.ts
+2
-2
src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts
...s/welcome/walkThrough/electron-browser/walkThroughPart.ts
+1
-1
src/vs/workbench/services/configuration/node/configuration.ts
...vs/workbench/services/configuration/node/configuration.ts
+2
-2
src/vs/workbench/services/keybinding/common/keybindingEditing.ts
...workbench/services/keybinding/common/keybindingEditing.ts
+1
-1
未找到文件。
src/vs/editor/common/services/modelServiceImpl.ts
浏览文件 @
8977893b
...
...
@@ -267,7 +267,7 @@ export class ModelServiceImpl implements IModelService {
public
getCreationOptions
(
language
:
string
):
editorCommon
.
ITextModelCreationOptions
{
let
creationOptions
=
this
.
_modelCreationOptionsByLanguage
[
language
];
if
(
!
creationOptions
)
{
creationOptions
=
ModelServiceImpl
.
_readModelOptions
(
this
.
_configurationService
.
getConfiguration
(
null
,
{
language
}));
creationOptions
=
ModelServiceImpl
.
_readModelOptions
(
this
.
_configurationService
.
getConfiguration
(
null
,
{
overrideIdentifier
:
language
}));
this
.
_modelCreationOptionsByLanguage
[
language
]
=
creationOptions
;
}
return
creationOptions
;
...
...
src/vs/editor/common/services/resourceConfigurationImpl.ts
浏览文件 @
8977893b
...
...
@@ -34,7 +34,7 @@ export class TextResourceConfigurationService extends Disposable implements ITex
const
position
:
IPosition
=
Position
.
isIPosition
(
arg2
)
?
arg2
:
null
;
const
section
:
string
=
position
?
(
typeof
arg3
===
'
string
'
?
arg3
:
void
0
)
:
(
typeof
arg2
===
'
string
'
?
arg2
:
void
0
);
const
language
=
resource
?
this
.
getLanguage
(
resource
,
position
)
:
void
0
;
return
this
.
configurationService
.
getConfiguration
<
T
>
(
section
,
{
resource
,
language
});
return
this
.
configurationService
.
getConfiguration
<
T
>
(
section
,
{
resource
,
overrideIdentifier
:
language
});
}
private
getLanguage
(
resource
:
URI
,
position
:
IPosition
):
string
{
...
...
src/vs/platform/configuration/common/configuration.ts
浏览文件 @
8977893b
...
...
@@ -16,7 +16,7 @@ import Event from 'vs/base/common/event';
export
const
IConfigurationService
=
createDecorator
<
IConfigurationService
>
(
'
configurationService
'
);
export
interface
IConfigurationOverrides
{
language
?:
string
;
overrideIdentifier
?:
string
;
resource
?:
URI
;
}
...
...
@@ -37,7 +37,7 @@ export interface IConfigurationService {
* Resolves a configuration key to its values in the different scopes
* the setting is defined.
*/
lookup
<
T
>
(
key
:
string
,
override
Identifier
?:
string
):
IConfigurationValue
<
T
>
;
lookup
<
T
>
(
key
:
string
,
override
s
?:
IConfigurationOverrides
):
IConfigurationValue
<
T
>
;
/**
* Returns the defined keys of configurations in the different scopes
...
...
@@ -246,13 +246,14 @@ export class Configuration<T> {
return
section
?
configModel
.
getContentsFor
<
C
>
(
section
)
:
configModel
.
contents
;
}
lookup
<
C
>
(
key
:
string
,
override
Identifier
?:
string
):
IConfigurationValue
<
C
>
{
lookup
<
C
>
(
key
:
string
,
override
s
:
IConfigurationOverrides
=
{}
):
IConfigurationValue
<
C
>
{
// make sure to clone the configuration so that the receiver does not tamper with the values
const
workspaceConfiguration
=
this
.
getConfigurationModel
(
overrides
);
return
{
default
:
objects
.
clone
(
getConfigurationValue
<
C
>
(
override
Identifier
?
this
.
_defaults
.
override
(
overrideIdentifier
).
contents
:
this
.
_defaults
.
contents
,
key
)),
user
:
objects
.
clone
(
getConfigurationValue
<
C
>
(
override
Identifier
?
this
.
_user
.
override
(
overrideIdentifier
).
contents
:
this
.
_user
.
contents
,
key
)),
workspace
:
objects
.
clone
(
this
.
_workspace
?
getConfigurationValue
<
C
>
(
override
Identifier
?
this
.
folders
.
get
(
this
.
workspaceUri
).
override
(
overrideIdentifier
).
contents
:
this
.
folders
.
get
(
this
.
workspaceUri
).
contents
,
key
)
:
void
0
),
value
:
objects
.
clone
(
getConfigurationValue
<
C
>
(
overrideIdentifier
?
this
.
_workspaceConfiguration
.
override
(
overrideIdentifier
).
contents
:
this
.
_
workspaceConfiguration
.
contents
,
key
))
default
:
objects
.
clone
(
getConfigurationValue
<
C
>
(
override
s
.
overrideIdentifier
?
this
.
_defaults
.
override
(
overrides
.
overrideIdentifier
).
contents
:
this
.
_defaults
.
contents
,
key
)),
user
:
objects
.
clone
(
getConfigurationValue
<
C
>
(
override
s
.
overrideIdentifier
?
this
.
_user
.
override
(
overrides
.
overrideIdentifier
).
contents
:
this
.
_user
.
contents
,
key
)),
workspace
:
objects
.
clone
(
this
.
_workspace
?
getConfigurationValue
<
C
>
(
override
s
.
overrideIdentifier
?
this
.
folders
.
get
(
this
.
workspaceUri
).
override
(
overrides
.
overrideIdentifier
).
contents
:
this
.
folders
.
get
(
this
.
workspaceUri
).
contents
,
key
)
:
void
0
),
value
:
objects
.
clone
(
getConfigurationValue
<
C
>
(
workspaceConfiguration
.
contents
,
key
))
};
}
...
...
@@ -302,7 +303,7 @@ export class Configuration<T> {
private
getConfigurationModel
<
C
>
(
overrides
:
IConfigurationOverrides
):
ConfigurationModel
<
any
>
{
let
configurationModel
=
this
.
getConfigurationForResource
(
overrides
);
return
overrides
.
language
?
configurationModel
.
override
<
T
>
(
overrides
.
language
)
:
configurationModel
;
return
overrides
.
overrideIdentifier
?
configurationModel
.
override
<
T
>
(
overrides
.
overrideIdentifier
)
:
configurationModel
;
}
private
getConfigurationForResource
({
resource
}:
IConfigurationOverrides
):
ConfigurationModel
<
any
>
{
...
...
src/vs/platform/configuration/node/configurationService.ts
浏览文件 @
8977893b
...
...
@@ -71,8 +71,8 @@ export class ConfigurationService<T> extends Disposable implements IConfiguratio
return
this
.
configuration
().
getValue
<
C
>
(
section
,
options
);
}
public
lookup
<
C
>
(
key
:
string
,
o
verrideIdentifier
?:
string
):
IConfigurationValue
<
C
>
{
return
this
.
configuration
().
lookup
<
C
>
(
key
,
o
verrideIdentifier
);
public
lookup
<
C
>
(
key
:
string
,
o
ptions
?:
IConfigurationOverrides
):
IConfigurationValue
<
C
>
{
return
this
.
configuration
().
lookup
<
C
>
(
key
,
o
ptions
);
}
public
keys
():
IConfigurationKeys
{
...
...
src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts
浏览文件 @
8977893b
...
...
@@ -419,7 +419,7 @@ export class WalkThroughPart extends BaseEditor {
}
private
getEditorOptions
(
language
:
string
):
IEditorOptions
{
const
config
=
this
.
configurationService
.
getConfiguration
<
IEditorOptions
>
(
'
editor
'
,
{
language
});
const
config
=
this
.
configurationService
.
getConfiguration
<
IEditorOptions
>
(
'
editor
'
,
{
overrideIdentifier
:
language
});
return
{
...
isObject
(
config
)
?
config
:
Object
.
create
(
null
),
scrollBeyondLastLine
:
false
,
...
...
src/vs/workbench/services/configuration/node/configuration.ts
浏览文件 @
8977893b
...
...
@@ -270,8 +270,8 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp
return
this
.
_configuration
.
getValue
<
C
>
(
section
,
overrides
);
}
public
lookup
<
C
>
(
key
:
string
,
override
Identifier
?:
string
):
IConfigurationValue
<
C
>
{
return
this
.
_configuration
.
lookup
<
C
>
(
key
,
override
Identifier
);
public
lookup
<
C
>
(
key
:
string
,
override
s
?:
IConfigurationOverrides
):
IConfigurationValue
<
C
>
{
return
this
.
_configuration
.
lookup
<
C
>
(
key
,
override
s
);
}
public
keys
():
IConfigurationKeys
{
...
...
src/vs/workbench/services/keybinding/common/keybindingEditing.ts
浏览文件 @
8977893b
...
...
@@ -215,7 +215,7 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding
private
resolveModelReference
():
TPromise
<
IReference
<
ITextEditorModel
>>
{
return
this
.
fileService
.
existsFile
(
this
.
resource
)
.
then
(
exists
=>
{
const
EOL
=
this
.
configurationService
.
getConfiguration
(
'
files
'
,
{
language
:
'
json
'
})[
'
eol
'
];
const
EOL
=
this
.
configurationService
.
getConfiguration
(
'
files
'
,
{
overrideIdentifier
:
'
json
'
})[
'
eol
'
];
const
result
=
exists
?
TPromise
.
as
(
null
)
:
this
.
fileService
.
updateContent
(
this
.
resource
,
this
.
getEmptyContent
(
EOL
),
{
encoding
:
'
utf8
'
});
return
result
.
then
(()
=>
this
.
textModelResolverService
.
createModelReference
(
this
.
resource
));
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录