Refresh master with initial release/0.24 snapshot (#332)

* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
This commit is contained in:
Karl Burtram
2017-12-15 15:38:57 -08:00
committed by GitHub
parent 271b3a0b82
commit 6ad0df0e3e
7118 changed files with 107999 additions and 56466 deletions

View File

@@ -0,0 +1,31 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
import { ActivitybarPart } from 'vs/workbench/browser/parts/activitybar/activitybarPart';
import { PanelPart } from 'vs/workbench/browser/parts/panel/panelPart';
import { IActivityService, IBadge } from 'vs/workbench/services/activity/common/activity';
import { IDisposable } from 'vs/base/common/lifecycle';
export class ActivityService implements IActivityService {
public _serviceBrand: any;
constructor(
private activitybarPart: ActivitybarPart,
private panelPart: PanelPart,
@IPanelService private panelService: IPanelService
) { }
public showActivity(compositeOrActionId: string, badge: IBadge, clazz?: string): IDisposable {
if (this.panelService.getPanels().filter(p => p.id === compositeOrActionId).length) {
return this.panelPart.showActivity(compositeOrActionId, badge, clazz);
}
return this.activitybarPart.showActivity(compositeOrActionId, badge, clazz);
}
}

View File

@@ -58,38 +58,13 @@ export class IconBadge extends BaseBadge {
export class ProgressBadge extends BaseBadge {
}
export const IActivityBarService = createDecorator<IActivityBarService>('activityBarService');
export const IActivityService = createDecorator<IActivityService>('activityService');
export interface IActivityBarService {
export interface IActivityService {
_serviceBrand: any;
/**
* Show activity in the activitybar for the given global activity.
* Show activity in the panel for the given panel or in the activitybar for the given viewlet or global action.
*/
showGlobalActivity(globalActivityId: string, badge: IBadge): IDisposable;
/**
* Show activity in the activitybar for the given viewlet.
*/
showActivity(viewletId: string, badge: IBadge, clazz?: string): IDisposable;
/**
* Unpins a viewlet from the activitybar.
*/
unpin(viewletId: string): void;
/**
* Pin a viewlet inside the activity bar.
*/
pin(viewletId: string): void;
/**
* Find out if a viewlet is pinned in the activity bar.
*/
isPinned(viewletId: string): boolean;
/**
* Reorder viewlet ordering by moving a viewlet to the location of another viewlet.
*/
move(viewletId: string, toViewletId: string): void;
showActivity(compositeOrActionId: string, badge: IBadge, clazz?: string): IDisposable;
}