From 1c28702c56ce91d8e7e8348fc4208fdd30550a8a Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Mon, 17 Oct 2016 16:41:33 -0700 Subject: [PATCH] Read config from global storage --- .../workbench/browser/parts/activitybar/activitybarPart.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index e270d9792c4..2564746bdf1 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -22,6 +22,7 @@ import { IActivityService, IBadge } from 'vs/workbench/services/activity/common/ import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IStorageService } from 'vs/platform/storage/common/storage'; export class ActivitybarPart extends Part implements IActivityService { public _serviceBrand: any; @@ -34,7 +35,8 @@ export class ActivitybarPart extends Part implements IActivityService { @IViewletService private viewletService: IViewletService, @IKeybindingService private keybindingService: IKeybindingService, @IInstantiationService private instantiationService: IInstantiationService, - @IPartService private partService: IPartService + @IPartService private partService: IPartService, + @IStorageService private storageService: IStorageService ) { super(id); @@ -60,9 +62,10 @@ export class ActivitybarPart extends Part implements IActivityService { } private onDidRegisterExternalViewlets(descriptors: ViewletDescriptor[]) { + const enabledViewlets = JSON.parse(this.storageService.get("enabledExternalViewlets")); descriptors.forEach(descriptor => { this.viewletSwitcherBar.push(this.toAction(descriptor), { label: true, icon: true }); - }) + }); } private onActiveCompositeChanged(composite: IComposite): void { -- GitLab