mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)
* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 * fix pipelines * fix strict-null-checks * add missing files
This commit is contained in:
9
src/bootstrap-window.js
vendored
9
src/bootstrap-window.js
vendored
@@ -21,7 +21,7 @@ exports.assign = function assign(destination, source) {
|
||||
*
|
||||
* @param {string[]} modulePaths
|
||||
* @param {(result, configuration: object) => any} resultCallback
|
||||
* @param {{ forceEnableDeveloperKeybindings?: boolean, removeDeveloperKeybindingsAfterLoad?: boolean, canModifyDOM?: (config: object) => void, beforeLoaderConfig?: (config: object, loaderConfig: object) => void, beforeRequire?: () => void }=} options
|
||||
* @param {{ forceEnableDeveloperKeybindings?: boolean, disallowReloadKeybinding?: boolean, removeDeveloperKeybindingsAfterLoad?: boolean, canModifyDOM?: (config: object) => void, beforeLoaderConfig?: (config: object, loaderConfig: object) => void, beforeRequire?: () => void }=} options
|
||||
*/
|
||||
exports.load = function (modulePaths, resultCallback, options) {
|
||||
|
||||
@@ -58,7 +58,7 @@ exports.load = function (modulePaths, resultCallback, options) {
|
||||
const enableDeveloperTools = (process.env['VSCODE_DEV'] || !!configuration.extensionDevelopmentPath) && !configuration.extensionTestsPath;
|
||||
let developerToolsUnbind;
|
||||
if (enableDeveloperTools || (options && options.forceEnableDeveloperKeybindings)) {
|
||||
developerToolsUnbind = registerDeveloperKeybindings();
|
||||
developerToolsUnbind = registerDeveloperKeybindings(options && options.disallowReloadKeybinding);
|
||||
}
|
||||
|
||||
// Correctly inherit the parent's environment
|
||||
@@ -178,9 +178,10 @@ function parseURLQueryArgs() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} disallowReloadKeybinding
|
||||
* @returns {() => void}
|
||||
*/
|
||||
function registerDeveloperKeybindings() {
|
||||
function registerDeveloperKeybindings(disallowReloadKeybinding) {
|
||||
|
||||
// @ts-ignore
|
||||
const ipc = require('electron').ipcRenderer;
|
||||
@@ -204,7 +205,7 @@ function registerDeveloperKeybindings() {
|
||||
const key = extractKey(e);
|
||||
if (key === TOGGLE_DEV_TOOLS_KB || key === TOGGLE_DEV_TOOLS_KB_ALT) {
|
||||
ipc.send('vscode:toggleDevTools');
|
||||
} else if (key === RELOAD_KB) {
|
||||
} else if (key === RELOAD_KB && !disallowReloadKeybinding) {
|
||||
ipc.send('vscode:reloadWindow');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user