Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -21,6 +21,7 @@ import { IMenubarData, IMenubarKeybinding, MenubarMenuItem, isMenubarMenuItemSep
import { URI } from 'vs/base/common/uri';
import { IStateService } from 'vs/platform/state/common/state';
import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain';
import { WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions';
const telemetryFrom = 'menu';
@@ -106,6 +107,7 @@ export class Menubar {
}
private addFallbackHandlers(): void {
// File Menu Items
this.fallbackMenuHandlers['workbench.action.files.newUntitledFile'] = () => this.windowsMainService.openNewWindow(OpenContext.MENU);
this.fallbackMenuHandlers['workbench.action.newWindow'] = () => this.windowsMainService.openNewWindow(OpenContext.MENU);
@@ -348,7 +350,7 @@ export class Menubar {
}
private setMacApplicationMenu(macApplicationMenu: Electron.Menu): void {
const about = new MenuItem({ label: nls.localize('mAbout', "About {0}", product.nameLong), role: 'about' });
const about = this.createMenuItem(nls.localize('mAbout', "About {0}", product.nameLong), 'workbench.action.showAboutDialog');
const checkForUpdates = this.getUpdateMenuItems();
let preferences;
@@ -643,8 +645,8 @@ export class Menubar {
};
if (checked) {
options['type'] = 'checkbox';
options['checked'] = checked;
options.type = 'checkbox';
options.checked = checked;
}
let commandId: string | undefined;
@@ -655,13 +657,14 @@ export class Menubar {
}
if (isMacintosh) {
// Add role for special case menu items
if (commandId === 'editor.action.clipboardCutAction') {
options['role'] = 'cut';
options.role = 'cut';
} else if (commandId === 'editor.action.clipboardCopyAction') {
options['role'] = 'copy';
options.role = 'copy';
} else if (commandId === 'editor.action.clipboardPasteAction') {
options['role'] = 'paste';
options.role = 'paste';
}
// Add context aware click handlers for special case menu items
@@ -790,13 +793,7 @@ export class Menubar {
}
private reportMenuActionTelemetry(id: string): void {
/* __GDPR__
"workbenchActionExecuted" : {
"id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('workbenchActionExecuted', { id, from: telemetryFrom });
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id, from: telemetryFrom });
}
private mnemonicLabel(label: string): string {