Skip to content

Commit d0ece63

Browse files
committed
Download external resources preference
Signed-off-by: azerr <azerr@redhat.com>
1 parent 6421751 commit d0ece63

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

package.json

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@
177177
"default": true,
178178
"markdownDescription": "Enable/disable logging to the Output view. Default is `true`."
179179
},
180+
"xml.downloadExternalRessource": {
181+
"type": "boolean",
182+
"default": true,
183+
"markdownDescription": "Download external resource like referenced DTD, XSD. Default is `true`.",
184+
"scope": "window"
185+
},
180186
"xml.catalogs": {
181187
"type": "array",
182188
"default": [],
@@ -320,16 +326,6 @@
320326
"default": false,
321327
"markdownDescription": "The option to put a closing bracket on a newline when `#xml.format.splitAttributes#` is `true`. Default value is `false`. See [here](command:xml.open.docs?%5B%7B%22page%22%3A%22Formatting%22%2C%22section%22%3A%22xmlformatclosingbracketnewline%22%7D%5D) for more information."
322328
},
323-
"xml.preferences.quoteStyle": {
324-
"type": "string",
325-
"enum": [
326-
"single",
327-
"double"
328-
],
329-
"default": "double",
330-
"markdownDescription": "Preferred quote style to use for completion: `single` quotes, `double` quotes. Default is `double`.",
331-
"scope": "window"
332-
},
333329
"xml.completion.autoCloseTags": {
334330
"type": "boolean",
335331
"default": true,
@@ -347,6 +343,16 @@
347343
"default": false,
348344
"markdownDescription": "Enable/disable XML CodeLens. Default is `false`. See [here](command:xml.open.docs?%5B%7B%22page%22%3A%22CodeLens%22%2C%22section%22%3A%22Code%20Lens%22%7D%5D) for information about CodeLens features"
349345
},
346+
"xml.preferences.quoteStyle": {
347+
"type": "string",
348+
"enum": [
349+
"single",
350+
"double"
351+
],
352+
"default": "double",
353+
"markdownDescription": "Preferred quote style to use for completion: `single` quotes, `double` quotes. Default is `double`.",
354+
"scope": "window"
355+
},
350356
"xml.preferences.showSchemaDocumentationType": {
351357
"type": "string",
352358
"default": "all",

src/settings/settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ export function getXMLSettings(javaHome: string | undefined, logfile: string, ex
226226
const isWorkspaceTrusted = (workspace as any).isTrusted;
227227
if (isWorkspaceTrusted !== undefined && !isWorkspaceTrusted) {
228228
xml['xml']['validation']['resolveExternalEntities'] = false;
229+
xml['xml']['downloadExternalResources'] = false;
229230
} else {
230231
xml['xml']['validation']['resolveExternalEntities'] = workspace.getConfiguration('xml').get('validation.resolveExternalEntities', false);
232+
xml['xml']['downloadExternalResources'] = workspace.getConfiguration('xml').get('downloadExternalResources', false);
231233
}
232234

233235
//applying externalXmlSettings to the xmlSettings

0 commit comments

Comments
 (0)