diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts index 06e521040c9..6554feee2d6 100644 --- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts @@ -83,7 +83,7 @@ interface IUserFriendlyViewDescriptor { // From 'remoteViewDescriptor' type group?: string; - remoteAuthority?: string; + remoteName?: string | string[]; } const viewDescriptor: IJSONSchema = { @@ -123,9 +123,12 @@ const remoteViewDescriptor: IJSONSchema = { description: localize('vscode.extension.contributes.view.group', 'Nested group in the viewlet'), type: 'string' }, - remoteAuthority: { - description: localize('vscode.extension.contributes.view.remoteAuthority', 'The remote authority associated with this view'), - type: 'string' + remoteName: { + description: localize('vscode.extension.contributes.view.remoteName', 'The name of the remote type associated with this view'), + type: ['string', 'array'], + items: { + type: 'string' + } } } }; @@ -435,7 +438,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution { extensionId: extension.description.identifier, originalContainerId: entry.key, group: item.group, - remoteAuthority: item.remoteAuthority + remoteAuthority: item.remoteName || (item).remoteAuthority // TODO@roblou - delete after remote extensions are updated }; viewIds.push(viewDescriptor.id); diff --git a/src/vs/workbench/common/views.ts b/src/vs/workbench/common/views.ts index a93bb3aca6c..6a4147042e3 100644 --- a/src/vs/workbench/common/views.ts +++ b/src/vs/workbench/common/views.ts @@ -148,7 +148,7 @@ export interface IViewDescriptor { // For contributed remote explorer views readonly group?: string; - readonly remoteAuthority?: string; + readonly remoteAuthority?: string | string[]; } export interface IViewDescriptorCollection extends IDisposable { diff --git a/src/vs/workbench/contrib/remote/browser/remote.ts b/src/vs/workbench/contrib/remote/browser/remote.ts index 0002bb19824..ed0a250c322 100644 --- a/src/vs/workbench/contrib/remote/browser/remote.ts +++ b/src/vs/workbench/contrib/remote/browser/remote.ts @@ -432,13 +432,16 @@ export class RemoteViewlet extends ViewContainerViewlet implements IViewModel { return; } - if (typeof descriptor.viewDescriptor.remoteAuthority === 'undefined' || - descriptor.viewDescriptor.remoteAuthority === actualRemoteAuthority || - descriptor.viewDescriptor.id === HelpPanel.ID - ) { + const descriptorAuthority = descriptor.viewDescriptor.remoteAuthority; + if (typeof descriptorAuthority === 'undefined' || descriptor.viewDescriptor.id === HelpPanel.ID) { panel.setExpanded(true); } else { - panel.setExpanded(false); + const descriptorAuthorityArr = Array.isArray(descriptorAuthority) ? descriptorAuthority : [descriptorAuthority]; + if (descriptorAuthorityArr.indexOf(actualRemoteAuthority) >= 0) { + panel.setExpanded(true); + } else { + panel.setExpanded(false); + } } }); }