From c0fd87bf789b7ab27b894e21a0910616f05ff677 Mon Sep 17 00:00:00 2001 From: Yosuke Matsusaka Date: Mon, 24 Jun 2019 09:13:14 +0900 Subject: [PATCH] add xml.fileAssociations configuration item --- xml/src/browser/xml-preferences.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/xml/src/browser/xml-preferences.ts b/xml/src/browser/xml-preferences.ts index 7908d54..128bf2f 100644 --- a/xml/src/browser/xml-preferences.ts +++ b/xml/src/browser/xml-preferences.ts @@ -40,6 +40,24 @@ export const XMLConfigSchema: PreferenceSchema = { "default": true, "description": "Insert space before end of self closing tag. \nExample:\n -> " }, + "xml.fileAssociations": { + "type": "array", + "default": [], + "items": { + "type": "object", + "properties": { + "systemId": { + "type": "string", + "description": "The path or URL to the XML schema (XSD or DTD)" + }, + "pattern": { + "type": "string", + "description": "File glob pattern. Example: **/*.Format.ps1xml\n\nMore information on the glob syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob", + } + } + }, + "description": "Allows XML schemas to be associated to file name patterns.\n\nExample:\n[{\n \"systemId\": \"path/to/file.xsd\",\n \"pattern\": \"file1.xml\"\n},\n{\n \"systemId\": \"http://www.w3.org/2001/XMLSchema.xsd\",\n \"pattern\": \"**/*.xsd\"\n}]", + }, "xml.logs.client": { "type": "boolean", "default": false, @@ -70,4 +88,4 @@ export function bindXMLPreferences(bind: interfaces.Bind): void { return createXMLPreferences(preferences); }); bind(PreferenceContribution).toConstantValue({ schema: XMLConfigSchema }); -} \ No newline at end of file +}