mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-05 20:44:43 +01:00
Support multiple configurations in extension editor (#54116)
* Support multiple configurations in extension editor * Check array only if properties not found * Allow contributes.configuration to be an array
This commit is contained in:
@@ -96,7 +96,7 @@ export interface IColor {
|
||||
|
||||
export interface IExtensionContributions {
|
||||
commands?: ICommand[];
|
||||
configuration?: IConfiguration;
|
||||
configuration?: IConfiguration | IConfiguration[];
|
||||
debuggers?: IDebugger[];
|
||||
grammars?: IGrammar[];
|
||||
jsonValidation?: IJSONValidation[];
|
||||
|
||||
@@ -667,7 +667,14 @@ export class ExtensionEditor extends BaseEditor {
|
||||
private renderSettings(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean {
|
||||
const contributes = manifest.contributes;
|
||||
const configuration = contributes && contributes.configuration;
|
||||
const properties = configuration && configuration.properties;
|
||||
let properties = {};
|
||||
if (Array.isArray(configuration)) {
|
||||
configuration.forEach(config => {
|
||||
properties = { ...properties, ...config.properties };
|
||||
});
|
||||
} else if (configuration) {
|
||||
properties = configuration.properties;
|
||||
}
|
||||
const contrib = properties ? Object.keys(properties) : [];
|
||||
|
||||
if (!contrib.length) {
|
||||
|
||||
Reference in New Issue
Block a user