Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
519d6183
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
519d6183
编写于
4月 20, 2016
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove addSchemaFileAssociation (was only used by legacy JSON mode)
上级
ed3a686a
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
3 addition
and
59 deletion
+3
-59
omnisharp-vscode
omnisharp-vscode
+1
-0
src/vs/languages/json/common/jsonSchemaService.ts
src/vs/languages/json/common/jsonSchemaService.ts
+0
-19
src/vs/platform/configuration/common/configurationRegistry.ts
...vs/platform/configuration/common/configurationRegistry.ts
+0
-4
src/vs/platform/extensions/common/extensionsRegistry.ts
src/vs/platform/extensions/common/extensionsRegistry.ts
+1
-2
src/vs/platform/jsonschemas/common/jsonContributionRegistry.ts
...s/platform/jsonschemas/common/jsonContributionRegistry.ts
+0
-19
src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.ts
...atform/jsonschemas/common/jsonValidationExtensionPoint.ts
+0
-9
src/vs/workbench/parts/debug/node/debugConfigurationManager.ts
...s/workbench/parts/debug/node/debugConfigurationManager.ts
+0
-1
src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts
.../parts/snippets/electron-browser/snippets.contribution.ts
+1
-2
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
...rkbench/parts/tasks/electron-browser/task.contribution.ts
+0
-1
src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
...services/keybinding/electron-browser/keybindingService.ts
+0
-2
未找到文件。
omnisharp-vscode
@
3c361af4
Subproject commit 3c361af4688c0d09fca99a220d80aec52b5c7052
src/vs/languages/json/common/jsonSchemaService.ts
浏览文件 @
519d6183
...
...
@@ -266,25 +266,6 @@ export class JSONSchemaService implements IJSONSchemaService {
this
.
contributionSchemas
[
id
]
=
this
.
addSchemaHandle
(
id
,
schemas
[
id
]);
}
}
if
(
schemaContributions
.
schemaAssociations
)
{
var
schemaAssociations
=
schemaContributions
.
schemaAssociations
;
for
(
let
pattern
in
schemaAssociations
)
{
var
associations
=
schemaAssociations
[
pattern
];
if
(
this
.
contextService
)
{
let
env
=
this
.
contextService
.
getConfiguration
().
env
;
if
(
env
)
{
pattern
=
pattern
.
replace
(
/%APP_SETTINGS_HOME%/
,
URI
.
file
(
env
.
appSettingsHome
).
toString
());
}
}
this
.
contributionAssociations
[
pattern
]
=
associations
;
var
fpa
=
this
.
getOrAddFilePatternAssociation
(
pattern
);
associations
.
forEach
(
schemaId
=>
{
var
id
=
this
.
normalizeId
(
schemaId
);
fpa
.
addSchema
(
id
);
});
}
}
}
private
addSchemaHandle
(
id
:
string
,
unresolvedSchemaContent
?:
IJSONSchema
)
:
SchemaHandle
{
...
...
src/vs/platform/configuration/common/configurationRegistry.ts
浏览文件 @
519d6183
...
...
@@ -62,10 +62,6 @@ class ConfigurationRegistry implements IConfigurationRegistry {
this
.
_onDidRegisterConfiguration
=
new
Emitter
<
IConfigurationRegistry
>
();
contributionRegistry
.
registerSchema
(
schemaId
,
this
.
configurationSchema
);
contributionRegistry
.
addSchemaFileAssociation
(
'
vscode://defaultsettings/settings.json
'
,
schemaId
);
contributionRegistry
.
addSchemaFileAssociation
(
'
%APP_SETTINGS_HOME%/settings.json
'
,
schemaId
);
contributionRegistry
.
addSchemaFileAssociation
(
'
/.vscode/settings.json
'
,
schemaId
);
}
public
get
onDidRegisterConfiguration
()
{
...
...
src/vs/platform/extensions/common/extensionsRegistry.ts
浏览文件 @
519d6183
...
...
@@ -438,5 +438,4 @@ const PRExtensions = {
Registry
.
add
(
PRExtensions
.
ExtensionsRegistry
,
new
ExtensionsRegistryImpl
());
export
const
ExtensionsRegistry
:
IExtensionsRegistry
=
Registry
.
as
(
PRExtensions
.
ExtensionsRegistry
);
schemaRegistry
.
registerSchema
(
schemaId
,
schema
);
schemaRegistry
.
addSchemaFileAssociation
(
'
/package.json
'
,
schemaId
);
\ No newline at end of file
schemaRegistry
.
registerSchema
(
schemaId
,
schema
);
\ No newline at end of file
src/vs/platform/jsonschemas/common/jsonContributionRegistry.ts
浏览文件 @
519d6183
...
...
@@ -16,7 +16,6 @@ export const Extensions = {
export
interface
ISchemaContributions
{
schemas
?:
{
[
id
:
string
]:
IJSONSchema
};
schemaAssociations
?:
{
[
pattern
:
string
]:
string
[]
};
}
export
interface
IJSONContributionRegistry
{
...
...
@@ -26,11 +25,6 @@ export interface IJSONContributionRegistry {
*/
registerSchema
(
uri
:
string
,
unresolvedSchemaContent
:
IJSONSchema
):
void
;
/**
* Register a schema association
*/
addSchemaFileAssociation
(
pattern
:
string
,
uri
:
string
):
void
;
/**
* Get all schemas
*/
...
...
@@ -58,12 +52,10 @@ function normalizeId(id: string) {
class
JSONContributionRegistry
implements
IJSONContributionRegistry
{
private
schemasById
:
{
[
id
:
string
]:
IJSONSchema
};
private
schemaAssociations
:
{
[
pattern
:
string
]:
string
[]
};
private
eventEmitter
:
IEventEmitter
;
constructor
()
{
this
.
schemasById
=
{};
this
.
schemaAssociations
=
{};
this
.
eventEmitter
=
new
EventEmitter
();
}
...
...
@@ -76,20 +68,9 @@ class JSONContributionRegistry implements IJSONContributionRegistry {
this
.
eventEmitter
.
emit
(
'
registryChanged
'
,
{});
}
public
addSchemaFileAssociation
(
pattern
:
string
,
uri
:
string
):
void
{
let
uris
=
this
.
schemaAssociations
[
pattern
];
if
(
!
uris
)
{
uris
=
[];
this
.
schemaAssociations
[
pattern
]
=
uris
;
}
uris
.
push
(
uri
);
this
.
eventEmitter
.
emit
(
'
registryChanged
'
,
{});
}
public
getSchemaContributions
():
ISchemaContributions
{
return
{
schemas
:
this
.
schemasById
,
schemaAssociations
:
this
.
schemaAssociations
};
}
...
...
src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.ts
浏览文件 @
519d6183
...
...
@@ -6,9 +6,7 @@
import
nls
=
require
(
'
vs/nls
'
);
import
{
ExtensionsRegistry
}
from
'
vs/platform/extensions/common/extensionsRegistry
'
;
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
JSONContributionRegistry
=
require
(
'
vs/platform/jsonschemas/common/jsonContributionRegistry
'
);
import
strings
=
require
(
'
vs/base/common/strings
'
);
import
paths
=
require
(
'
vs/base/common/paths
'
);
...
...
@@ -17,8 +15,6 @@ interface IJSONValidationExtensionPoint {
url
:
string
;
}
let
schemaRegistry
=
<
JSONContributionRegistry
.
IJSONContributionRegistry
>
Registry
.
as
(
JSONContributionRegistry
.
Extensions
.
JSONContribution
);
let
configurationExtPoint
=
ExtensionsRegistry
.
registerExtensionPoint
<
IJSONValidationExtensionPoint
[]
>
(
'
jsonValidation
'
,
{
description
:
nls
.
localize
(
'
contributes.jsonValidation
'
,
'
Contributes json schema configuration.
'
),
type
:
'
array
'
,
...
...
@@ -72,11 +68,6 @@ export class JSONValidationExtensionPoint {
collector
.
error
(
nls
.
localize
(
'
invalid.url.schema
'
,
"
'configuration.jsonValidation.url' must start with 'http:', 'https:' or './' to reference schemas located in the extension
"
));
return
;
}
let
fileMatch
=
extension
.
fileMatch
;
if
(
!
strings
.
startsWith
(
extension
.
fileMatch
,
'
/
'
))
{
fileMatch
=
'
/
'
+
fileMatch
;
}
schemaRegistry
.
addSchemaFileAssociation
(
fileMatch
,
uri
);
});
}
});
...
...
src/vs/workbench/parts/debug/node/debugConfigurationManager.ts
浏览文件 @
519d6183
...
...
@@ -142,7 +142,6 @@ const schema: IJSONSchema = {
const
jsonRegistry
=
<
jsonContributionRegistry
.
IJSONContributionRegistry
>
platform
.
Registry
.
as
(
jsonContributionRegistry
.
Extensions
.
JSONContribution
);
jsonRegistry
.
registerSchema
(
schemaId
,
schema
);
jsonRegistry
.
addSchemaFileAssociation
(
'
/.vscode/launch.json
'
,
schemaId
);
export
class
ConfigurationManager
implements
debug
.
IConfigurationManager
{
...
...
src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts
浏览文件 @
519d6183
...
...
@@ -163,5 +163,4 @@ let schema : IJSONSchema = {
};
let
schemaRegistry
=
<
JSONContributionRegistry
.
IJSONContributionRegistry
>
platform
.
Registry
.
as
(
JSONContributionRegistry
.
Extensions
.
JSONContribution
);
schemaRegistry
.
registerSchema
(
schemaId
,
schema
);
schemaRegistry
.
addSchemaFileAssociation
(
'
%APP_SETTINGS_HOME%/snippets/*.json
'
,
schemaId
);
\ No newline at end of file
schemaRegistry
.
registerSchema
(
schemaId
,
schema
);
\ No newline at end of file
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
浏览文件 @
519d6183
...
...
@@ -1308,4 +1308,3 @@ let schema : IJSONSchema =
};
let
jsonRegistry
=
<
jsonContributionRegistry
.
IJSONContributionRegistry
>
Registry
.
as
(
jsonContributionRegistry
.
Extensions
.
JSONContribution
);
jsonRegistry
.
registerSchema
(
schemaId
,
schema
);
jsonRegistry
.
addSchemaFileAssociation
(
'
/.vscode/tasks.json
'
,
schemaId
);
src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
浏览文件 @
519d6183
...
...
@@ -314,5 +314,3 @@ let schema : IJSONSchema = {
let
schemaRegistry
=
<
IJSONContributionRegistry
>
Registry
.
as
(
Extensions
.
JSONContribution
);
schemaRegistry
.
registerSchema
(
schemaId
,
schema
);
schemaRegistry
.
addSchemaFileAssociation
(
'
vscode://defaultsettings/keybindings.json
'
,
schemaId
);
schemaRegistry
.
addSchemaFileAssociation
(
'
%APP_SETTINGS_HOME%/keybindings.json
'
,
schemaId
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录