From 454d16efd7f6e251347687dc0f74cbf2e3fbfea2 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 15 Aug 2019 14:34:00 -0700 Subject: [PATCH] remote explorer and contribution under proposed api --- src/vs/workbench/api/browser/viewsExtensionPoint.ts | 7 ++++++- src/vs/workbench/contrib/remote/browser/remote.ts | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts index 95a9aff3298..b12e7ec2bf6 100644 --- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts @@ -151,7 +151,7 @@ const viewsContribution: IJSONSchema = { default: [] }, 'remote': { - description: localize('views.remote', "Contributes views to Remote container in the Activity bar"), + description: localize('views.remote', "Contributes views to Remote container in the Activity bar. To contribute to this container, enableProposedApi needs to be turned on"), type: 'array', items: nestableViewDescriptor, default: [] @@ -387,6 +387,11 @@ class ViewsExtensionHandler implements IWorkbenchContribution { return; } + if (entry.key === 'remote' && !extension.description.enableProposedApi) { + collector.warn(localize('ViewContainerRequiresProposedAPI', "View container '{0}' requires 'enableProposedApi' turned on to be added to 'Remote'.", entry.key)); + return; + } + const viewContainer = this.getViewContainer(entry.key); if (!viewContainer) { collector.warn(localize('ViewContainerDoesnotExist', "View container '{0}' does not exist and all views registered to it will be added to 'Explorer'.", entry.key)); diff --git a/src/vs/workbench/contrib/remote/browser/remote.ts b/src/vs/workbench/contrib/remote/browser/remote.ts index ea530271414..eb7bc581f9d 100644 --- a/src/vs/workbench/contrib/remote/browser/remote.ts +++ b/src/vs/workbench/contrib/remote/browser/remote.ts @@ -386,6 +386,10 @@ export class RemoteViewlet extends ViewContainerViewlet implements IViewModel { } private _handleRemoteInfoExtensionPoint(extension: IExtensionPointUser, helpInformation: HelpInformation[]) { + if (!extension.description.enableProposedApi) { + return; + } + if (!extension.value.documentation && !extension.value.feedback && !extension.value.getStarted && !extension.value.issues) { return; } -- GitLab