mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 09:35:40 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
|
||||
import 'vs/css!./contextMenuHandler';
|
||||
|
||||
import { combinedDisposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ActionRunner, IRunEvent } from 'vs/base/common/actions';
|
||||
import { ActionRunner, IRunEvent, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
|
||||
import { combinedDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { Menu } from 'vs/base/browser/ui/menu/menu';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -67,7 +67,7 @@ export class ContextMenuHandler {
|
||||
this.block = container.appendChild($('.context-view-block'));
|
||||
}
|
||||
|
||||
const menuDisposables: IDisposable[] = [];
|
||||
const menuDisposables = new DisposableStore();
|
||||
|
||||
const actionRunner = delegate.actionRunner || new ActionRunner();
|
||||
actionRunner.onDidBeforeRun(this.onActionRun, this, menuDisposables);
|
||||
@@ -79,7 +79,7 @@ export class ContextMenuHandler {
|
||||
getKeyBinding: delegate.getKeyBinding ? delegate.getKeyBinding : action => this.keybindingService.lookupKeybinding(action.id)
|
||||
});
|
||||
|
||||
menuDisposables.push(attachMenuStyler(menu, this.themeService));
|
||||
menuDisposables.add(attachMenuStyler(menu, this.themeService));
|
||||
|
||||
menu.onDidCancel(() => this.contextViewService.hideContextView(true), null, menuDisposables);
|
||||
menu.onDidBlur(() => this.contextViewService.hideContextView(true), null, menuDisposables);
|
||||
@@ -104,7 +104,7 @@ export class ContextMenuHandler {
|
||||
this.contextViewService.hideContextView(true);
|
||||
}, null, menuDisposables);
|
||||
|
||||
return combinedDisposable([...menuDisposables, menu]);
|
||||
return combinedDisposable(menuDisposables, menu);
|
||||
},
|
||||
|
||||
focus: () => {
|
||||
@@ -132,13 +132,7 @@ export class ContextMenuHandler {
|
||||
|
||||
private onActionRun(e: IRunEvent): void {
|
||||
if (this.telemetryService) {
|
||||
/* __GDPR__
|
||||
"workbenchActionExecuted" : {
|
||||
"id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
||||
"from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
}
|
||||
*/
|
||||
this.telemetryService.publicLog('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' });
|
||||
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' });
|
||||
}
|
||||
|
||||
this.contextViewService.hideContextView(false);
|
||||
|
||||
@@ -17,7 +17,7 @@ export class ContextMenuService extends Disposable implements IContextMenuServic
|
||||
_serviceBrand: any;
|
||||
|
||||
private _onDidContextMenu = this._register(new Emitter<void>());
|
||||
get onDidContextMenu(): Event<void> { return this._onDidContextMenu.event; }
|
||||
readonly onDidContextMenu: Event<void> = this._onDidContextMenu.event;
|
||||
|
||||
private contextMenuHandler: ContextMenuHandler;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user