mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -3,10 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export interface IActivity {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -14,31 +10,4 @@ export interface IActivity {
|
||||
cssClass?: string;
|
||||
}
|
||||
|
||||
export interface IGlobalActivity extends IActivity {
|
||||
getActions(): IAction[];
|
||||
}
|
||||
|
||||
export const GlobalActivityExtensions = 'workbench.contributions.globalActivities';
|
||||
|
||||
export interface IGlobalActivityRegistry {
|
||||
registerActivity(descriptor: IConstructorSignature0<IGlobalActivity>): void;
|
||||
getActivities(): IConstructorSignature0<IGlobalActivity>[];
|
||||
}
|
||||
|
||||
export class GlobalActivityRegistry implements IGlobalActivityRegistry {
|
||||
|
||||
private readonly activityDescriptors = new Set<IConstructorSignature0<IGlobalActivity>>();
|
||||
|
||||
registerActivity(descriptor: IConstructorSignature0<IGlobalActivity>): void {
|
||||
this.activityDescriptors.add(descriptor);
|
||||
}
|
||||
|
||||
getActivities(): IConstructorSignature0<IGlobalActivity>[] {
|
||||
const result: IConstructorSignature0<IGlobalActivity>[] = [];
|
||||
this.activityDescriptors.forEach(d => result.push(d));
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Registry.add(GlobalActivityExtensions, new GlobalActivityRegistry());
|
||||
export const GLOBAL_ACTIVITY_ID = 'workbench.action.globalActivity';
|
||||
Reference in New Issue
Block a user