mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)
* Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d * Fix vs unit tests and hygiene issue * Fix strict null check issue
This commit is contained in:
@@ -8,7 +8,7 @@ import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/co
|
||||
import { ICommandHandler, CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
import { SyncActionDescriptor, MenuRegistry, MenuId, ICommandAction } from 'vs/platform/actions/common/actions';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
@@ -33,10 +33,10 @@ Registry.add(Extensions.WorkbenchActions, new class implements IWorkbenchActionR
|
||||
}
|
||||
|
||||
private registerWorkbenchCommandFromAction(descriptor: SyncActionDescriptor, alias: string, category?: string, when?: ContextKeyExpr): IDisposable {
|
||||
let registrations: IDisposable[] = [];
|
||||
const registrations = new DisposableStore();
|
||||
|
||||
// command
|
||||
registrations.push(CommandsRegistry.registerCommand(descriptor.id, this.createCommandHandler(descriptor)));
|
||||
registrations.add(CommandsRegistry.registerCommand(descriptor.id, this.createCommandHandler(descriptor)));
|
||||
|
||||
// keybinding
|
||||
const weight = (typeof descriptor.keybindingWeight === 'undefined' ? KeybindingWeight.WorkbenchContrib : descriptor.keybindingWeight);
|
||||
@@ -72,13 +72,13 @@ Registry.add(Extensions.WorkbenchActions, new class implements IWorkbenchActionR
|
||||
|
||||
MenuRegistry.addCommand(command);
|
||||
|
||||
registrations.push(MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command, when }));
|
||||
registrations.add(MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command, when }));
|
||||
}
|
||||
|
||||
// TODO@alex,joh
|
||||
// support removal of keybinding rule
|
||||
// support removal of command-ui
|
||||
return combinedDisposable(registrations);
|
||||
return registrations;
|
||||
}
|
||||
|
||||
private createCommandHandler(descriptor: SyncActionDescriptor): ICommandHandler {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Memento } from 'vs/workbench/common/memento';
|
||||
import { Memento, MementoObject } from 'vs/workbench/common/memento';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { Themable } from 'vs/workbench/common/theme';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
@@ -35,7 +35,7 @@ export class Component extends Themable {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
protected getMemento(scope: StorageScope): object {
|
||||
protected getMemento(scope: StorageScope): MementoObject {
|
||||
return this.memento.getMemento(scope);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,17 +20,17 @@ export interface IComposite {
|
||||
/**
|
||||
* Returns the primary actions of the composite.
|
||||
*/
|
||||
getActions(): IAction[];
|
||||
getActions(): ReadonlyArray<IAction>;
|
||||
|
||||
/**
|
||||
* Returns the secondary actions of the composite.
|
||||
*/
|
||||
getSecondaryActions(): IAction[];
|
||||
getSecondaryActions(): ReadonlyArray<IAction>;
|
||||
|
||||
/**
|
||||
* Returns an array of actions to show in the context menu of the composite
|
||||
*/
|
||||
getContextMenuActions(): IAction[];
|
||||
getContextMenuActions(): ReadonlyArray<IAction>;
|
||||
|
||||
/**
|
||||
* Returns the action item for a specific action.
|
||||
|
||||
@@ -23,7 +23,9 @@ import { coalesce } from 'vs/base/common/arrays';
|
||||
|
||||
export const ActiveEditorContext = new RawContextKey<string | null>('activeEditor', null);
|
||||
export const EditorsVisibleContext = new RawContextKey<boolean>('editorIsOpen', false);
|
||||
export const EditorPinnedContext = new RawContextKey<boolean>('editorPinned', false);
|
||||
export const EditorGroupActiveEditorDirtyContext = new RawContextKey<boolean>('groupActiveEditorDirty', false);
|
||||
export const EditorGroupEditorsCountContext = new RawContextKey<number>('groupEditorsCount', 0);
|
||||
export const NoEditorsVisibleContext: ContextKeyExpr = EditorsVisibleContext.toNegated();
|
||||
export const TextCompareEditorVisibleContext = new RawContextKey<boolean>('textCompareEditorVisible', false);
|
||||
export const TextCompareEditorActiveContext = new RawContextKey<boolean>('textCompareEditorActive', false);
|
||||
@@ -31,6 +33,7 @@ export const ActiveEditorGroupEmptyContext = new RawContextKey<boolean>('activeE
|
||||
export const MultipleEditorGroupsContext = new RawContextKey<boolean>('multipleEditorGroups', false);
|
||||
export const SingleEditorGroupsContext = MultipleEditorGroupsContext.toNegated();
|
||||
export const InEditorZenModeContext = new RawContextKey<boolean>('inZenMode', false);
|
||||
export const IsCenteredLayoutContext = new RawContextKey<boolean>('isCenteredLayout', false);
|
||||
export const SplitEditorsVertically = new RawContextKey<boolean>('splitEditorsVertically', false);
|
||||
|
||||
/**
|
||||
@@ -175,7 +178,7 @@ export interface IEditorInputFactoryRegistry {
|
||||
*
|
||||
* @param editorInputId the identifier of the editor input
|
||||
*/
|
||||
getEditorInputFactory(editorInputId: string): IEditorInputFactory;
|
||||
getEditorInputFactory(editorInputId: string): IEditorInputFactory | undefined;
|
||||
|
||||
/**
|
||||
* Starts the registry by providing the required services.
|
||||
@@ -1058,23 +1061,22 @@ export interface IEditorMemento<T> {
|
||||
class EditorInputFactoryRegistry implements IEditorInputFactoryRegistry {
|
||||
private instantiationService: IInstantiationService;
|
||||
private fileInputFactory: IFileInputFactory;
|
||||
private editorInputFactoryConstructors: { [editorInputId: string]: IConstructorSignature0<IEditorInputFactory> } = Object.create(null);
|
||||
private readonly editorInputFactoryInstances: { [editorInputId: string]: IEditorInputFactory } = Object.create(null);
|
||||
private readonly editorInputFactoryConstructors: Map<string, IConstructorSignature0<IEditorInputFactory>> = new Map();
|
||||
private readonly editorInputFactoryInstances: Map<string, IEditorInputFactory> = new Map();
|
||||
|
||||
start(accessor: ServicesAccessor): void {
|
||||
this.instantiationService = accessor.get(IInstantiationService);
|
||||
|
||||
for (let key in this.editorInputFactoryConstructors) {
|
||||
const element = this.editorInputFactoryConstructors[key];
|
||||
this.createEditorInputFactory(key, element);
|
||||
}
|
||||
this.editorInputFactoryConstructors.forEach((ctor, key) => {
|
||||
this.createEditorInputFactory(key, ctor);
|
||||
});
|
||||
|
||||
this.editorInputFactoryConstructors = Object.create(null);
|
||||
this.editorInputFactoryConstructors.clear();
|
||||
}
|
||||
|
||||
private createEditorInputFactory(editorInputId: string, ctor: IConstructorSignature0<IEditorInputFactory>): void {
|
||||
const instance = this.instantiationService.createInstance(ctor);
|
||||
this.editorInputFactoryInstances[editorInputId] = instance;
|
||||
this.editorInputFactoryInstances.set(editorInputId, instance);
|
||||
}
|
||||
|
||||
registerFileInputFactory(factory: IFileInputFactory): void {
|
||||
@@ -1087,14 +1089,14 @@ class EditorInputFactoryRegistry implements IEditorInputFactoryRegistry {
|
||||
|
||||
registerEditorInputFactory(editorInputId: string, ctor: IConstructorSignature0<IEditorInputFactory>): void {
|
||||
if (!this.instantiationService) {
|
||||
this.editorInputFactoryConstructors[editorInputId] = ctor;
|
||||
this.editorInputFactoryConstructors.set(editorInputId, ctor);
|
||||
} else {
|
||||
this.createEditorInputFactory(editorInputId, ctor);
|
||||
}
|
||||
}
|
||||
|
||||
getEditorInputFactory(editorInputId: string): IEditorInputFactory {
|
||||
return this.editorInputFactoryInstances[editorInputId];
|
||||
getEditorInputFactory(editorInputId: string): IEditorInputFactory | undefined {
|
||||
return this.editorInputFactoryInstances.get(editorInputId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ export class ResourceEditorInput extends EditorInput implements IModeSupport {
|
||||
ref.dispose();
|
||||
this.modelReference = null;
|
||||
|
||||
return Promise.reject(new Error(`Unexpected model for ResourceInput: ${this.resource}`));
|
||||
throw new Error(`Unexpected model for ResourceInput: ${this.resource}`);
|
||||
}
|
||||
|
||||
this.cachedModel = model;
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { isEmptyObject } from 'vs/base/common/types';
|
||||
|
||||
export type MementoObject = { [key: string]: any };
|
||||
|
||||
export class Memento {
|
||||
|
||||
private static globalMementos: { [id: string]: ScopedMemento } = Object.create(null);
|
||||
private static workspaceMementos: { [id: string]: ScopedMemento } = Object.create(null);
|
||||
private static readonly globalMementos = new Map<string, ScopedMemento>();
|
||||
private static readonly workspaceMementos = new Map<string, ScopedMemento>();
|
||||
|
||||
private static readonly COMMON_PREFIX = 'memento/';
|
||||
|
||||
@@ -19,24 +21,24 @@ export class Memento {
|
||||
this.id = Memento.COMMON_PREFIX + id;
|
||||
}
|
||||
|
||||
getMemento(scope: StorageScope): object {
|
||||
getMemento(scope: StorageScope): MementoObject {
|
||||
|
||||
// Scope by Workspace
|
||||
if (scope === StorageScope.WORKSPACE) {
|
||||
let workspaceMemento = Memento.workspaceMementos[this.id];
|
||||
let workspaceMemento = Memento.workspaceMementos.get(this.id);
|
||||
if (!workspaceMemento) {
|
||||
workspaceMemento = new ScopedMemento(this.id, scope, this.storageService);
|
||||
Memento.workspaceMementos[this.id] = workspaceMemento;
|
||||
Memento.workspaceMementos.set(this.id, workspaceMemento);
|
||||
}
|
||||
|
||||
return workspaceMemento.getMemento();
|
||||
}
|
||||
|
||||
// Scope Global
|
||||
let globalMemento = Memento.globalMementos[this.id];
|
||||
let globalMemento = Memento.globalMementos.get(this.id);
|
||||
if (!globalMemento) {
|
||||
globalMemento = new ScopedMemento(this.id, scope, this.storageService);
|
||||
Memento.globalMementos[this.id] = globalMemento;
|
||||
Memento.globalMementos.set(this.id, globalMemento);
|
||||
}
|
||||
|
||||
return globalMemento.getMemento();
|
||||
@@ -45,13 +47,13 @@ export class Memento {
|
||||
saveMemento(): void {
|
||||
|
||||
// Workspace
|
||||
const workspaceMemento = Memento.workspaceMementos[this.id];
|
||||
const workspaceMemento = Memento.workspaceMementos.get(this.id);
|
||||
if (workspaceMemento) {
|
||||
workspaceMemento.save();
|
||||
}
|
||||
|
||||
// Global
|
||||
const globalMemento = Memento.globalMementos[this.id];
|
||||
const globalMemento = Memento.globalMementos.get(this.id);
|
||||
if (globalMemento) {
|
||||
globalMemento.save();
|
||||
}
|
||||
@@ -59,17 +61,17 @@ export class Memento {
|
||||
}
|
||||
|
||||
class ScopedMemento {
|
||||
private readonly mementoObj: object;
|
||||
private readonly mementoObj: MementoObject;
|
||||
|
||||
constructor(private id: string, private scope: StorageScope, private storageService: IStorageService) {
|
||||
this.mementoObj = this.load();
|
||||
}
|
||||
|
||||
getMemento(): object {
|
||||
getMemento(): MementoObject {
|
||||
return this.mementoObj;
|
||||
}
|
||||
|
||||
private load(): object {
|
||||
private load(): MementoObject {
|
||||
const memento = this.storageService.get(this.id, this.scope);
|
||||
if (memento) {
|
||||
return JSON.parse(memento);
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { INotification, INotificationHandle, INotificationActions, INotificationProgress, NoOpNotification, Severity, NotificationMessage, IPromptChoice } from 'vs/platform/notification/common/notification';
|
||||
import { INotification, INotificationHandle, INotificationActions, INotificationProgress, NoOpNotification, Severity, NotificationMessage, IPromptChoice, IStatusMessageOptions } from 'vs/platform/notification/common/notification';
|
||||
import { toErrorMessage } from 'vs/base/common/errorMessage';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { isPromiseCanceledError } from 'vs/base/common/errors';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { isErrorWithActions } from 'vs/base/common/errorsWithActions';
|
||||
@@ -15,10 +15,25 @@ import { localize } from 'vs/nls';
|
||||
|
||||
export interface INotificationsModel {
|
||||
|
||||
//
|
||||
// Notifications as Toasts/Center
|
||||
//
|
||||
|
||||
readonly notifications: INotificationViewItem[];
|
||||
|
||||
readonly onDidNotificationChange: Event<INotificationChangeEvent>;
|
||||
|
||||
notify(notification: INotification): INotificationHandle;
|
||||
addNotification(notification: INotification): INotificationHandle;
|
||||
|
||||
//
|
||||
// Notifications as Status
|
||||
//
|
||||
|
||||
readonly statusMessage: IStatusMessageViewItem | undefined;
|
||||
|
||||
readonly onDidStatusMessageChange: Event<IStatusMessageChangeEvent>;
|
||||
|
||||
showStatusMessage(message: NotificationMessage, options?: IStatusMessageOptions): IDisposable;
|
||||
}
|
||||
|
||||
export const enum NotificationChangeType {
|
||||
@@ -45,6 +60,29 @@ export interface INotificationChangeEvent {
|
||||
kind: NotificationChangeType;
|
||||
}
|
||||
|
||||
export const enum StatusMessageChangeType {
|
||||
ADD,
|
||||
REMOVE
|
||||
}
|
||||
|
||||
export interface IStatusMessageViewItem {
|
||||
message: string;
|
||||
options?: IStatusMessageOptions;
|
||||
}
|
||||
|
||||
export interface IStatusMessageChangeEvent {
|
||||
|
||||
/**
|
||||
* The status message item this change is about.
|
||||
*/
|
||||
item: IStatusMessageViewItem;
|
||||
|
||||
/**
|
||||
* The kind of status message change.
|
||||
*/
|
||||
kind: StatusMessageChangeType;
|
||||
}
|
||||
|
||||
export class NotificationHandle implements INotificationHandle {
|
||||
|
||||
private readonly _onDidClose: Emitter<void> = new Emitter();
|
||||
@@ -90,13 +128,16 @@ export class NotificationsModel extends Disposable implements INotificationsMode
|
||||
private readonly _onDidNotificationChange: Emitter<INotificationChangeEvent> = this._register(new Emitter<INotificationChangeEvent>());
|
||||
get onDidNotificationChange(): Event<INotificationChangeEvent> { return this._onDidNotificationChange.event; }
|
||||
|
||||
private readonly _onDidStatusMessageChange: Emitter<IStatusMessageChangeEvent> = this._register(new Emitter<IStatusMessageChangeEvent>());
|
||||
get onDidStatusMessageChange(): Event<IStatusMessageChangeEvent> { return this._onDidStatusMessageChange.event; }
|
||||
|
||||
private readonly _notifications: INotificationViewItem[] = [];
|
||||
get notifications(): INotificationViewItem[] { return this._notifications; }
|
||||
|
||||
get notifications(): INotificationViewItem[] {
|
||||
return this._notifications;
|
||||
}
|
||||
private _statusMessage: IStatusMessageViewItem | undefined;
|
||||
get statusMessage(): IStatusMessageViewItem | undefined { return this._statusMessage; }
|
||||
|
||||
notify(notification: INotification): INotificationHandle {
|
||||
addNotification(notification: INotification): INotificationHandle {
|
||||
const item = this.createViewItem(notification);
|
||||
if (!item) {
|
||||
return NotificationsModel.NO_OP_NOTIFICATION; // return early if this is a no-op
|
||||
@@ -174,6 +215,26 @@ export class NotificationsModel extends Disposable implements INotificationsMode
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
showStatusMessage(message: NotificationMessage, options?: IStatusMessageOptions): IDisposable {
|
||||
const item = StatusMessageViewItem.create(message, options);
|
||||
if (!item) {
|
||||
return Disposable.None;
|
||||
}
|
||||
|
||||
// Remember as current status message and fire events
|
||||
this._statusMessage = item;
|
||||
this._onDidStatusMessageChange.fire({ kind: StatusMessageChangeType.ADD, item });
|
||||
|
||||
return toDisposable(() => {
|
||||
|
||||
// Only reset status message if the item is still the one we had remembered
|
||||
if (this._statusMessage === item) {
|
||||
this._statusMessage = undefined;
|
||||
this._onDidStatusMessageChange.fire({ kind: StatusMessageChangeType.REMOVE, item });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export interface INotificationViewItem {
|
||||
@@ -621,4 +682,26 @@ export class ChoiceAction extends Action {
|
||||
|
||||
this._onDidRun.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
class StatusMessageViewItem {
|
||||
|
||||
static create(notification: NotificationMessage, options?: IStatusMessageOptions): IStatusMessageViewItem | null {
|
||||
if (!notification || isPromiseCanceledError(notification)) {
|
||||
return null; // we need a message to show
|
||||
}
|
||||
|
||||
let message: string | undefined;
|
||||
if (notification instanceof Error) {
|
||||
message = toErrorMessage(notification, false);
|
||||
} else if (typeof notification === 'string') {
|
||||
message = notification;
|
||||
}
|
||||
|
||||
if (!message) {
|
||||
return null; // we need a message to show
|
||||
}
|
||||
|
||||
return { message, options };
|
||||
}
|
||||
}
|
||||
@@ -8,5 +8,6 @@ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
|
||||
export const ActivePanelContext = new RawContextKey<string>('activePanel', '');
|
||||
export const PanelFocusContext = new RawContextKey<boolean>('panelFocus', false);
|
||||
export const PanelPositionContext = new RawContextKey<string>('panelPosition', 'bottom');
|
||||
|
||||
export interface IPanel extends IComposite { }
|
||||
|
||||
@@ -30,6 +30,12 @@ export const TAB_ACTIVE_BACKGROUND = registerColor('tab.activeBackground', {
|
||||
hc: editorBackground
|
||||
}, nls.localize('tabActiveBackground', "Active tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
|
||||
|
||||
export const TAB_UNFOCUSED_ACTIVE_BACKGROUND = registerColor('tab.unfocusedActiveBackground', {
|
||||
dark: TAB_ACTIVE_BACKGROUND,
|
||||
light: TAB_ACTIVE_BACKGROUND,
|
||||
hc: TAB_ACTIVE_BACKGROUND
|
||||
}, nls.localize('tabUnfocusedActiveBackground', "Active tab background color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
|
||||
|
||||
export const TAB_INACTIVE_BACKGROUND = registerColor('tab.inactiveBackground', {
|
||||
dark: '#2D2D2D',
|
||||
light: '#ECECEC',
|
||||
@@ -138,7 +144,6 @@ export const TAB_UNFOCUSED_INACTIVE_FOREGROUND = registerColor('tab.unfocusedIna
|
||||
hc: Color.white
|
||||
}, nls.localize('tabUnfocusedInactiveForeground', "Inactive tab foreground color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
|
||||
|
||||
|
||||
// < --- Editors --- >
|
||||
|
||||
export const EDITOR_PANE_BACKGROUND = registerColor('editorPane.background', {
|
||||
@@ -570,4 +575,4 @@ export class Themable extends Disposable {
|
||||
|
||||
return color ? color.toString() : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ITreeViewDataProvider } from 'vs/workbench/common/views';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IViewlet } from 'vs/workbench/common/viewlet';
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
|
||||
import { values, keys } from 'vs/base/common/map';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
@@ -71,12 +71,12 @@ export class ViewContainer {
|
||||
protected constructor(readonly id: string, readonly hideIfEmpty: boolean, readonly extensionId?: ExtensionIdentifier) { }
|
||||
}
|
||||
|
||||
class ViewContainersRegistryImpl implements IViewContainersRegistry {
|
||||
class ViewContainersRegistryImpl extends Disposable implements IViewContainersRegistry {
|
||||
|
||||
private readonly _onDidRegister = new Emitter<ViewContainer>();
|
||||
private readonly _onDidRegister = this._register(new Emitter<ViewContainer>());
|
||||
readonly onDidRegister: Event<ViewContainer> = this._onDidRegister.event;
|
||||
|
||||
private readonly _onDidDeregister = new Emitter<ViewContainer>();
|
||||
private readonly _onDidDeregister = this._register(new Emitter<ViewContainer>());
|
||||
readonly onDidDeregister: Event<ViewContainer> = this._onDidDeregister.event;
|
||||
|
||||
private viewContainers: Map<string, ViewContainer> = new Map<string, ViewContainer>();
|
||||
@@ -169,15 +169,15 @@ export interface IViewsRegistry {
|
||||
getViewContainer(id: string): ViewContainer | null;
|
||||
}
|
||||
|
||||
class ViewsRegistry implements IViewsRegistry {
|
||||
class ViewsRegistry extends Disposable implements IViewsRegistry {
|
||||
|
||||
private readonly _onViewsRegistered: Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }> = new Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }>();
|
||||
private readonly _onViewsRegistered: Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }>());
|
||||
readonly onViewsRegistered: Event<{ views: IViewDescriptor[], viewContainer: ViewContainer }> = this._onViewsRegistered.event;
|
||||
|
||||
private readonly _onViewsDeregistered: Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }> = new Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }>();
|
||||
private readonly _onViewsDeregistered: Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }>());
|
||||
readonly onViewsDeregistered: Event<{ views: IViewDescriptor[], viewContainer: ViewContainer }> = this._onViewsDeregistered.event;
|
||||
|
||||
private readonly _onDidChangeContainer: Emitter<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }> = new Emitter<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>();
|
||||
private readonly _onDidChangeContainer: Emitter<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>());
|
||||
readonly onDidChangeContainer: Event<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }> = this._onDidChangeContainer.event;
|
||||
|
||||
private _viewContainers: ViewContainer[] = [];
|
||||
|
||||
Reference in New Issue
Block a user