本文整理汇总了TypeScript中vs/base/common/eventEmitter.IEventEmitter类的典型用法代码示例。如果您正苦于以下问题:TypeScript IEventEmitter类的具体用法?TypeScript IEventEmitter怎么用?TypeScript IEventEmitter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IEventEmitter类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: addSchemaFileAssociation
public addSchemaFileAssociation(pattern: string, uri: string): void {
let uris = this.schemaAssociations[pattern];
if (!uris) {
uris = [];
this.schemaAssociations[pattern] = uris;
}
uris.push(uri);
this.eventEmitter.emit('registryChanged', {});
}
示例2: emitMouseDown
public emitMouseDown(e:IEditorMouseEvent): void {
this.convertViewToModelMouseEvent(e);
this.outgoingEventBus.emit(editorCommon.EventType.MouseDown, e);
}
示例3: emitContextMenu
public emitContextMenu(e:IEditorMouseEvent): void {
this.convertViewToModelMouseEvent(e);
this.outgoingEventBus.emit(editorCommon.EventType.ContextMenu, e);
}
示例4: emitKeyUp
public emitKeyUp(e:IKeyboardEvent): void {
this.outgoingEventBus.emit(editorCommon.EventType.KeyUp, e);
}
示例5: registerSchema
public registerSchema(uri: string, unresolvedSchemaContent: IJSONSchema): void {
this.schemasById[normalizeId(uri)] = unresolvedSchemaContent;
this.eventEmitter.emit('registryChanged', {});
}
示例6: addRegistryChangedListener
public addRegistryChangedListener(callback: (e: IJSONContributionRegistryEvent) => void): IDisposable {
return this.eventEmitter.addListener2('registryChanged', callback);
}