提交 c3abc676 编写于 作者: M Martin Aeschlimann

Use 'vscode' URI for keybinding schema and default doc

上级 0b66ccdf
......@@ -24,7 +24,7 @@ export class JSONDocumentSymbols {
// special handling for key bindings
let resourceString = document.uri;
if ((resourceString === 'inmemory://defaults/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {
if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {
if (root.type === 'array') {
let result: SymbolInformation[] = [];
(<Parser.ArrayASTNode>root).items.forEach((item) => {
......
......@@ -279,7 +279,7 @@ export class JSONWorker extends AbstractModeWorker implements Modes.IExtraInfoSu
// special handling for key bindings
var resourceString = resource.toString();
if ((resourceString === 'inmemory://defaults/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {
if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {
if (root.type === 'array') {
var result : Modes.IOutlineEntry[] = [];
(<Parser.ArrayASTNode> root).items.forEach((item) => {
......@@ -357,7 +357,7 @@ export class JSONWorker extends AbstractModeWorker implements Modes.IExtraInfoSu
};
this.jsonIntellisense.getValueSuggestions(resource, schema, doc, node.parent, node.start, collector);
var range = modelMirror.getRangeFromOffsetAndLength(node.start, node.end - node.start);
var text = modelMirror.getValueInRange(range);
for (var i = 0, len = proposals.length; i < len; i++) {
......
......@@ -282,7 +282,7 @@ export class WorkbenchKeybindingService extends KeybindingService {
}
}
let schemaId = 'local://schemas/keybindings';
let schemaId = 'vscode://schemas/keybindings';
let schema : IJSONSchema = {
'id': schemaId,
'type': 'array',
......@@ -309,5 +309,5 @@ let schema : IJSONSchema = {
let schemaRegistry = <JSONContributionRegistry.IJSONContributionRegistry>Registry.as(JSONContributionRegistry.Extensions.JSONContribution);
schemaRegistry.registerSchema(schemaId, schema);
schemaRegistry.addSchemaFileAssociation('inmemory://defaults/keybindings.json', schemaId);
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.
先完成此消息的编辑!
想要评论请 注册