This commit is contained in:
Sandeep Somavarapu
2019-04-12 07:44:56 +02:00
parent 67c28b3f03
commit 1fd2993b54
9 changed files with 133 additions and 19 deletions

View File

@@ -35,16 +35,17 @@ const configurationEntrySchema: IJSONSchema = {
properties: {
isExecutable: {
type: 'boolean',
deprecationMessage: 'This property is deprecated. Instead use `scope` property and set it to `application` value.'
deprecationMessage: 'This property is deprecated. Instead use `scope` property and set it to `machine` value.'
},
scope: {
type: 'string',
enum: ['application', 'window', 'resource'],
enum: ['application', 'machine', 'window', 'resource'],
default: 'window',
enumDescriptions: [
nls.localize('scope.application.description', "Application specific configuration, which can be configured only in User settings."),
nls.localize('scope.window.description', "Window specific configuration, which can be configured in the User or Workspace settings."),
nls.localize('scope.resource.description', "Resource specific configuration, which can be configured in the User, Workspace or Folder settings.")
nls.localize('scope.application.description', "Application specific configuration, which can be configured only in application user settings."),
nls.localize('scope.machine.description', "Machine specific configuration, which can be configured only in user settings."),
nls.localize('scope.window.description', "Window specific configuration, which can be configured in the user or workspace settings."),
nls.localize('scope.resource.description', "Resource specific configuration, which can be configured in the wser, workspace or folder settings.")
],
description: nls.localize('scope.description', "Scope in which the configuration is applicable. Available scopes are `window` and `resource`.")
},
@@ -210,6 +211,8 @@ function validateProperties(configuration: IConfigurationNode, extension: IExten
if (propertyConfiguration.scope) {
if (propertyConfiguration.scope.toString() === 'application') {
propertyConfiguration.scope = ConfigurationScope.APPLICATION;
} else if (propertyConfiguration.scope.toString() === 'machine') {
propertyConfiguration.scope = ConfigurationScope.MACHINE;
} else if (propertyConfiguration.scope.toString() === 'resource') {
propertyConfiguration.scope = ConfigurationScope.RESOURCE;
} else {