mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
Remove customEditor.scheme contribution point
This commit is contained in:
@@ -303,18 +303,11 @@ function matches(selector: CustomEditorSelector, resource: URI): boolean {
|
||||
return glob.match(selector.mime, mime.toLowerCase());
|
||||
}
|
||||
|
||||
if (!selector.filenamePattern && !selector.scheme) {
|
||||
return false;
|
||||
}
|
||||
if (selector.filenamePattern) {
|
||||
if (!glob.match(selector.filenamePattern.toLowerCase(), basename(resource).toLowerCase())) {
|
||||
return false;
|
||||
if (glob.match(selector.filenamePattern.toLowerCase(), basename(resource).toLowerCase())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (selector.scheme) {
|
||||
if (resource.scheme !== selector.scheme) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -54,9 +54,9 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
|
||||
type: 'string',
|
||||
description: nls.localize('editor.editorAssociations.viewType', "Editor view type."),
|
||||
},
|
||||
'scheme': {
|
||||
'mime': {
|
||||
type: 'string',
|
||||
description: nls.localize('editor.editorAssociations.scheme', "Uri scheme the editor should be used for."),
|
||||
description: nls.localize('editor.editorAssociations.mime', "Mime type the editor should be used for. This is used for binary files."),
|
||||
},
|
||||
'filenamePattern': {
|
||||
type: 'string',
|
||||
|
||||
@@ -29,7 +29,6 @@ export const enum CustomEditorDiscretion {
|
||||
}
|
||||
|
||||
export interface CustomEditorSelector {
|
||||
readonly scheme?: string;
|
||||
readonly filenamePattern?: string;
|
||||
readonly mime?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user