Merge vscode 1.67 (#20883)

* Fix initial build breaks from 1.67 merge (#2514)

* Update yarn lock files

* Update build scripts

* Fix tsconfig

* Build breaks

* WIP

* Update yarn lock files

* Misc breaks

* Updates to package.json

* Breaks

* Update yarn

* Fix breaks

* Breaks

* Build breaks

* Breaks

* Breaks

* Breaks

* Breaks

* Breaks

* Missing file

* Breaks

* Breaks

* Breaks

* Breaks

* Breaks

* Fix several runtime breaks (#2515)

* Missing files

* Runtime breaks

* Fix proxy ordering issue

* Remove commented code

* Fix breaks with opening query editor

* Fix post merge break

* Updates related to setup build and other breaks (#2516)

* Fix bundle build issues

* Update distro

* Fix distro merge and update build JS files

* Disable pipeline steps

* Remove stats call

* Update license name

* Make new RPM dependencies a warning

* Fix extension manager version checks

* Update JS file

* Fix a few runtime breaks

* Fixes

* Fix runtime issues

* Fix build breaks

* Update notebook tests (part 1)

* Fix broken tests

* Linting errors

* Fix hygiene

* Disable lint rules

* Bump distro

* Turn off smoke tests

* Disable integration tests

* Remove failing "activate" test

* Remove failed test assertion

* Disable other broken test

* Disable query history tests

* Disable extension unit tests

* Disable failing tasks
This commit is contained in:
Karl Burtram
2022-10-19 19:13:18 -07:00
committed by GitHub
parent 33c6daaea1
commit 8a3d08f0de
3738 changed files with 192313 additions and 107208 deletions
+72 -34
View File
@@ -37,9 +37,6 @@ if (process.env['VSCODE_PARENT_PID']) {
terminateWhenParentTerminates();
}
// Configure Crash Reporter
configureCrashReporter();
// Load AMD entry point
require('./bootstrap-amd').load(process.env['VSCODE_AMD_ENTRYPOINT']);
@@ -47,12 +44,13 @@ require('./bootstrap-amd').load(process.env['VSCODE_AMD_ENTRYPOINT']);
//#region Helpers
function pipeLoggingToParent() {
const MAX_STREAM_BUFFER_LENGTH = 1024 * 1024;
const MAX_LENGTH = 100000;
/**
* Prevent circular stringify and convert arguments to real array
*
* @param {IArguments} args
* @param {ArrayLike<unknown>} args
*/
function safeToArray(args) {
const seen = [];
@@ -61,26 +59,27 @@ function pipeLoggingToParent() {
// Massage some arguments with special treatment
if (args.length) {
for (let i = 0; i < args.length; i++) {
let arg = args[i];
// Any argument of type 'undefined' needs to be specially treated because
// JSON.stringify will simply ignore those. We replace them with the string
// 'undefined' which is not 100% right, but good enough to be logged to console
if (typeof args[i] === 'undefined') {
args[i] = 'undefined';
if (typeof arg === 'undefined') {
arg = 'undefined';
}
// Any argument that is an Error will be changed to be just the error stack/message
// itself because currently cannot serialize the error over entirely.
else if (args[i] instanceof Error) {
const errorObj = args[i];
else if (arg instanceof Error) {
const errorObj = arg;
if (errorObj.stack) {
args[i] = errorObj.stack;
arg = errorObj.stack;
} else {
args[i] = errorObj.toString();
arg = errorObj.toString();
}
}
argsArray.push(args[i]);
argsArray.push(arg);
}
}
@@ -151,26 +150,76 @@ function pipeLoggingToParent() {
safeSend({ type: '__$console', severity, arguments: args });
}
let isMakingConsoleCall = false;
/**
* Wraps a console message so that it is transmitted to the renderer. If
* native logging is turned on, the original console message will be written
* as well. This is needed since the console methods are "magic" in V8 and
* are the only methods that allow later introspection of logged variables.
*
* The wrapped property is not defined with `writable: false` to avoid
* throwing errors, but rather a no-op setting. See https://github.com/microsoft/vscode-extension-telemetry/issues/88
*
* @param {'log' | 'info' | 'warn' | 'error'} method
* @param {'log' | 'warn' | 'error'} severity
*/
function wrapConsoleMethod(method, severity) {
if (process.env['VSCODE_LOG_NATIVE'] === 'true') {
const original = console[method];
console[method] = function () {
safeSendConsoleMessage(severity, safeToArray(arguments));
const stream = method === 'error' || method === 'warn' ? process.stderr : process.stdout;
stream.write('\nSTART_NATIVE_LOG\n');
original.apply(console, arguments);
stream.write('\nEND_NATIVE_LOG\n');
};
const stream = method === 'error' || method === 'warn' ? process.stderr : process.stdout;
Object.defineProperty(console, method, {
set: () => { },
get: () => function () {
safeSendConsoleMessage(severity, safeToArray(arguments));
isMakingConsoleCall = true;
stream.write('\nSTART_NATIVE_LOG\n');
original.apply(console, arguments);
stream.write('\nEND_NATIVE_LOG\n');
isMakingConsoleCall = false;
},
});
} else {
console[method] = function () { safeSendConsoleMessage(severity, safeToArray(arguments)); };
Object.defineProperty(console, method, {
set: () => { },
get: () => function () { safeSendConsoleMessage(severity, safeToArray(arguments)); },
});
}
}
/**
* Wraps process.stderr/stdout.write() so that it is transmitted to the
* renderer or CLI. It both calls through to the original method as well
* as to console.log with complete lines so that they're made available
* to the debugger/CLI.
*
* @param {'stdout' | 'stderr'} streamName
* @param {'log' | 'warn' | 'error'} severity
*/
function wrapStream(streamName, severity) {
const stream = process[streamName];
const original = stream.write;
/** @type string */
let buf = '';
Object.defineProperty(stream, 'write', {
set: () => { },
get: () => (chunk, encoding, callback) => {
if (!isMakingConsoleCall) {
buf += chunk.toString(encoding);
const eol = buf.length > MAX_STREAM_BUFFER_LENGTH ? buf.length : buf.lastIndexOf('\n');
if (eol !== -1) {
console[severity](buf.slice(0, eol));
buf = buf.slice(eol + 1);
}
}
original.call(stream, chunk, encoding, callback);
},
});
}
// Pass console logging to the outside so that we have it in the main side if told so
if (process.env['VSCODE_VERBOSE_LOGGING'] === 'true') {
wrapConsoleMethod('info', 'log');
@@ -183,6 +232,9 @@ function pipeLoggingToParent() {
console.info = function () { /* ignore */ };
wrapConsoleMethod('error', 'error');
}
wrapStream('stderr', 'error');
wrapStream('stdout', 'log');
}
function handleExceptions() {
@@ -212,18 +264,4 @@ function terminateWhenParentTerminates() {
}
}
function configureCrashReporter() {
const crashReporterOptionsRaw = process.env['VSCODE_CRASH_REPORTER_START_OPTIONS'];
if (typeof crashReporterOptionsRaw === 'string') {
try {
const crashReporterOptions = JSON.parse(crashReporterOptionsRaw);
if (crashReporterOptions && process['crashReporter'] /* Electron only */) {
process['crashReporter'].start(crashReporterOptions);
}
} catch (error) {
console.error(error);
}
}
}
//#endregion
+17 -9
View File
@@ -45,11 +45,13 @@
async function load(modulePaths, resultCallback, options) {
const isDev = !!safeProcess.env['VSCODE_DEV'];
// Error handler (TODO@sandbox non-sandboxed only)
// Error handler (node.js enabled renderers only)
let showDevtoolsOnError = isDev;
safeProcess.on('uncaughtException', function (/** @type {string | Error} */ error) {
onUnexpectedError(error, showDevtoolsOnError);
});
if (!safeProcess.sandboxed) {
safeProcess.on('uncaughtException', function (/** @type {string | Error} */ error) {
onUnexpectedError(error, showDevtoolsOnError);
});
}
// Await window configuration from preload
const timeout = setTimeout(() => { console.error(`[resolve window config] Could not resolve window configuration within 10 seconds, but will continue to wait...`); }, 10000);
@@ -83,7 +85,7 @@
developerDeveloperKeybindingsDisposable = registerDeveloperKeybindings(disallowReloadKeybinding);
}
// Enable ASAR support (TODO@sandbox non-sandboxed only)
// Enable ASAR support (node.js enabled renderers only)
if (!safeProcess.sandboxed) {
globalThis.MonacoBootstrap.enableASARSupport(configuration.appRoot);
}
@@ -100,9 +102,12 @@
window.document.documentElement.setAttribute('lang', locale);
// Replace the patched electron fs with the original node fs for all AMD code (TODO@sandbox non-sandboxed only)
// Define `fs` as `original-fs` to disable ASAR support
// in fs-operations (node.js enabled renderers only)
if (!safeProcess.sandboxed) {
require.define('fs', [], function () { return require.__$__nodeRequire('original-fs'); });
require.define('fs', [], function () {
return require.__$__nodeRequire('original-fs');
});
}
window['MonacoEnvironment'] = {};
@@ -135,14 +140,17 @@
'xterm-addon-unicode11': `${baseNodeModulesPath}/xterm-addon-unicode11/lib/xterm-addon-unicode11.js`,
'xterm-addon-webgl': `${baseNodeModulesPath}/xterm-addon-webgl/lib/xterm-addon-webgl.js`,
'iconv-lite-umd': `${baseNodeModulesPath}/iconv-lite-umd/lib/iconv-lite-umd.js`,
'@vscode/iconv-lite-umd': `${baseNodeModulesPath}/@vscode/iconv-lite-umd/lib/iconv-lite-umd.js`,
'jschardet': `${baseNodeModulesPath}/jschardet/dist/jschardet.min.js`,
'@vscode/vscode-languagedetection': `${baseNodeModulesPath}/@vscode/vscode-languagedetection/dist/lib/index.js`,
'vscode-regexp-languagedetection': `${baseNodeModulesPath}/vscode-regexp-languagedetection/dist/index.js`,
'tas-client-umd': `${baseNodeModulesPath}/tas-client-umd/lib/tas-client-umd.js`,
'ansi_up': `${baseNodeModulesPath}/ansi_up/ansi_up.js`,
'azdataGraph': `${baseNodeModulesPath}/azdataGraph/dist/build.js`
};
// For priviledged renderers, allow to load built-in and other node.js
// Cached data config (node.js loading only)
// Allow to load built-in and other node.js modules via AMD
// modules via AMD which has a fallback to using node.js `require`
// (node.js enabled renderers only)
if (!safeProcess.sandboxed) {
// VS Code uses an AMD loader for its own files (and ours) but Node.JS normally uses commonjs. For modules that
// support UMD this may cause some issues since it will appear to them that AMD exists and so depending on the order
+4 -7
View File
@@ -28,9 +28,9 @@
// increase number of stack frames(from 10, https://github.com/v8/v8/wiki/Stack-Trace-API)
Error.stackTraceLimit = 100;
// Workaround for Electron not installing a handler to ignore SIGPIPE
// (https://github.com/electron/electron/issues/13254)
if (typeof process !== 'undefined') {
if (typeof process !== 'undefined' && !process.env['VSCODE_HANDLES_SIGPIPE']) {
// Workaround for Electron not installing a handler to ignore SIGPIPE
// (https://github.com/electron/electron/issues/13254)
process.on('SIGPIPE', () => {
console.error(new Error('Unexpected SIGPIPE'));
});
@@ -42,9 +42,6 @@
//#region Add support for using node_modules.asar
/**
* TODO@sandbox remove the support for passing in `appRoot` once
* sandbox is fully enabled
*
* @param {string=} appRoot
*/
function enableASARSupport(appRoot) {
@@ -100,7 +97,7 @@
}
if (!asarPathAdded && appRoot) {
// Assuming that adding just `NODE_MODULES_ASAR_PATH` is sufficient
// because nodejs should find it even if it has a different driver letter case
// because nodejs should find it even if it has a different drive letter case
paths.push(NODE_MODULES_ASAR_PATH);
}
}
+61 -12
View File
@@ -3,24 +3,66 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const { createModuleDescription, createEditorWorkerModuleDescription } = require('./vs/base/buildfile');
/**
* @param {string} name
* @param {string[]} exclude
*/
function createModuleDescription(name, exclude) {
exports.base = [{
name: 'vs/base/common/worker/simpleWorker',
include: ['vs/editor/common/services/editorSimpleWorker'],
prepend: ['vs/loader.js', 'vs/nls.js'],
append: ['vs/base/worker/workerMain'],
dest: 'vs/base/worker/workerMain.js'
}];
let excludes = ['vs/css', 'vs/nls'];
if (Array.isArray(exclude) && exclude.length > 0) {
excludes = excludes.concat(exclude);
}
exports.workerExtensionHost = [createEditorWorkerModuleDescription('vs/workbench/services/extensions/worker/extensionHostWorker')];
return {
name: name,
include: [],
exclude: excludes
};
}
/**
* @param {string} name
*/
function createEditorWorkerModuleDescription(name) {
return createModuleDescription(name, ['vs/base/common/worker/simpleWorker', 'vs/editor/common/services/editorSimpleWorker']);
}
exports.base = [
{
name: 'vs/editor/common/services/editorSimpleWorker',
include: ['vs/base/common/worker/simpleWorker'],
prepend: ['vs/loader.js', 'vs/nls.js'],
append: ['vs/base/worker/workerMain'],
dest: 'vs/base/worker/workerMain.js'
},
{
name: 'vs/base/common/worker/simpleWorker',
},
{
name: 'vs/platform/extensions/node/extensionHostStarterWorker',
exclude: ['vs/base/common/worker/simpleWorker']
}
];
exports.workerExtensionHost = [createEditorWorkerModuleDescription('vs/workbench/api/worker/extensionHostWorker')];
exports.workerNotebook = [createEditorWorkerModuleDescription('vs/workbench/contrib/notebook/common/services/notebookSimpleWorker')];
exports.workerSharedProcess = [createEditorWorkerModuleDescription('vs/platform/sharedProcess/electron-browser/sharedProcessWorkerMain')];
exports.workerLanguageDetection = [createEditorWorkerModuleDescription('vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker')];
exports.workerLocalFileSearch = [createEditorWorkerModuleDescription('vs/workbench/services/search/worker/localFileSearch')];
exports.workbenchDesktop = require('./vs/workbench/buildfile.desktop').collectModules();
exports.workbenchWeb = require('./vs/workbench/buildfile.web').collectModules();
exports.workbenchDesktop = [
createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputer'),
createModuleDescription('vs/workbench/contrib/debug/node/telemetryApp'),
createModuleDescription('vs/platform/files/node/watcher/watcherMain'),
createModuleDescription('vs/platform/terminal/node/ptyHostMain'),
createModuleDescription('vs/workbench/api/node/extensionHostProcess')
];
exports.workbenchWeb = [
createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputer'),
createModuleDescription('vs/code/browser/workbench/workbench', ['vs/workbench/workbench.web.main'])
];
exports.keyboardMaps = [
createModuleDescription('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux'),
@@ -28,6 +70,13 @@ exports.keyboardMaps = [
createModuleDescription('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win')
];
exports.code = require('./vs/code/buildfile').collectModules();
exports.code = [
createModuleDescription('vs/code/electron-main/main'),
createModuleDescription('vs/code/node/cli'),
createModuleDescription('vs/code/node/cliProcessMain', ['vs/code/node/cli']),
createModuleDescription('vs/code/electron-sandbox/issue/issueReporterMain'),
createModuleDescription('vs/code/electron-browser/sharedProcess/sharedProcessMain'),
createModuleDescription('vs/code/electron-sandbox/processExplorer/processExplorerMain')
];
exports.entrypoint = createModuleDescription;
+1 -34
View File
@@ -21,14 +21,11 @@ const os = require('os');
const bootstrap = require('./bootstrap');
const bootstrapNode = require('./bootstrap-node');
const { getUserDataPath } = require('./vs/platform/environment/node/userDataPath');
const { stripComments } = require('./vs/base/common/stripComments');
/** @type {Partial<IProductConfiguration>} */
const product = require('../product.json');
const { app, protocol, crashReporter } = require('electron');
// Disable render process reuse, we still have
// non-context aware native modules in the renderer.
app.allowRendererProcessReuse = false;
// Enable portable support
const portable = bootstrapNode.configurePortable(product);
@@ -533,8 +530,6 @@ function getCodeCachePath() {
* @returns {Promise<string>}
*/
function mkdirp(dir) {
const fs = require('fs');
return new Promise((resolve, reject) => {
fs.mkdir(dir, { recursive: true }, err => (err && err.code !== 'EEXIST') ? reject(err) : resolve(dir));
});
@@ -596,34 +591,6 @@ async function resolveNlsConfiguration() {
return nlsConfiguration;
}
/**
* @param {string} content
* @returns {string}
*/
function stripComments(content) {
const regexp = /("(?:[^\\"]*(?:\\.)?)*")|('(?:[^\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g;
return content.replace(regexp, function (match, m1, m2, m3, m4) {
// Only one of m1, m2, m3, m4 matches
if (m3) {
// A block comment. Replace with nothing
return '';
} else if (m4) {
// A line comment. If it ends in \r?\n then keep it.
const length_1 = m4.length;
if (length_1 > 2 && m4[length_1 - 1] === '\n') {
return m4[length_1 - 2] === '\r' ? '\r\n' : '\n';
}
else {
return '';
}
} else {
// We match a string
return match;
}
});
}
/**
* Language tags are case insensitive however an amd loader is case sensitive
* To make this work on case preserving & insensitive FS we do the following:
+21
View File
@@ -0,0 +1,21 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
const path = require('path');
// Keep bootstrap-amd.js from redefining 'fs'.
delete process.env['ELECTRON_RUN_AS_NODE'];
if (process.env['VSCODE_DEV']) {
// When running out of sources, we need to load node modules from remote/node_modules,
// which are compiled against nodejs, not electron
process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'] = process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'] || path.join(__dirname, '..', 'remote', 'node_modules');
require('./bootstrap-node').injectNodeModuleLookupPath(process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH']);
} else {
delete process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'];
}
require('./bootstrap-amd').load('vs/server/node/server.cli');
+338
View File
@@ -0,0 +1,338 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
const perf = require('./vs/base/common/performance');
const performance = require('perf_hooks').performance;
const product = require('../product.json');
const readline = require('readline');
const http = require('http');
perf.mark('code/server/start');
// @ts-ignore
global.vscodeServerStartTime = performance.now();
async function start() {
const minimist = require('minimist');
// Do a quick parse to determine if a server or the cli needs to be started
const parsedArgs = minimist(process.argv.slice(2), {
boolean: ['start-server', 'list-extensions', 'print-ip-address', 'help', 'version', 'accept-server-license-terms'],
string: ['install-extension', 'install-builtin-extension', 'uninstall-extension', 'locate-extension', 'socket-path', 'host', 'port', 'pick-port', 'compatibility'],
alias: { help: 'h', version: 'v' }
});
['host', 'port', 'accept-server-license-terms'].forEach(e => {
if (!parsedArgs[e]) {
const envValue = process.env[`VSCODE_SERVER_${e.toUpperCase().replace('-', '_')}`];
if (envValue) {
parsedArgs[e] = envValue;
}
}
});
const extensionLookupArgs = ['list-extensions', 'locate-extension'];
const extensionInstallArgs = ['install-extension', 'install-builtin-extension', 'uninstall-extension'];
const shouldSpawnCli = parsedArgs.help || parsedArgs.version || extensionLookupArgs.some(a => !!parsedArgs[a]) || (extensionInstallArgs.some(a => !!parsedArgs[a]) && !parsedArgs['start-server']);
if (shouldSpawnCli) {
loadCode().then((mod) => {
mod.spawnCli();
});
return;
}
if (parsedArgs['compatibility'] === '1.63') {
console.warn(`server.sh is being replaced by 'bin/${product.serverApplicationName}'. Please migrate to the new command and adopt the following new default behaviors:`);
console.warn('* connection token is mandatory unless --without-connection-token is used');
console.warn('* host defaults to `localhost`');
}
/**
* @typedef { import('./vs/server/node/remoteExtensionHostAgentServer').IServerAPI } IServerAPI
*/
/** @type {IServerAPI | null} */
let _remoteExtensionHostAgentServer = null;
/** @type {Promise<IServerAPI> | null} */
let _remoteExtensionHostAgentServerPromise = null;
/** @returns {Promise<IServerAPI>} */
const getRemoteExtensionHostAgentServer = () => {
if (!_remoteExtensionHostAgentServerPromise) {
_remoteExtensionHostAgentServerPromise = loadCode().then((mod) => mod.createServer(address));
}
return _remoteExtensionHostAgentServerPromise;
};
const http = require('http');
const os = require('os');
if (Array.isArray(product.serverLicense) && product.serverLicense.length) {
console.log(product.serverLicense.join('\n'));
if (product.serverLicensePrompt && parsedArgs['accept-server-license-terms'] !== true) {
if (hasStdinWithoutTty()) {
console.log('To accept the license terms, start the server with --accept-server-license-terms');
process.exit(1);
}
try {
const accept = await prompt(product.serverLicensePrompt);
if (!accept) {
process.exit(1);
}
} catch (e) {
console.log(e);
process.exit(1);
}
}
}
let firstRequest = true;
let firstWebSocket = true;
/** @type {string | import('net').AddressInfo | null} */
let address = null;
const server = http.createServer(async (req, res) => {
if (firstRequest) {
firstRequest = false;
perf.mark('code/server/firstRequest');
}
const remoteExtensionHostAgentServer = await getRemoteExtensionHostAgentServer();
return remoteExtensionHostAgentServer.handleRequest(req, res);
});
server.on('upgrade', async (req, socket) => {
if (firstWebSocket) {
firstWebSocket = false;
perf.mark('code/server/firstWebSocket');
}
const remoteExtensionHostAgentServer = await getRemoteExtensionHostAgentServer();
// @ts-ignore
return remoteExtensionHostAgentServer.handleUpgrade(req, socket);
});
server.on('error', async (err) => {
const remoteExtensionHostAgentServer = await getRemoteExtensionHostAgentServer();
return remoteExtensionHostAgentServer.handleServerError(err);
});
const host = sanitizeStringArg(parsedArgs['host']) || (parsedArgs['compatibility'] !== '1.63' ? 'localhost' : undefined);
const nodeListenOptions = (
parsedArgs['socket-path']
? { path: sanitizeStringArg(parsedArgs['socket-path']) }
: { host, port: await parsePort(host, sanitizeStringArg(parsedArgs['port']), sanitizeStringArg(parsedArgs['pick-port'])) }
);
server.listen(nodeListenOptions, async () => {
let output = Array.isArray(product.serverGreeting) && product.serverGreeting.length ? `\n\n${product.serverGreeting.join('\n')}\n\n` : ``;
if (typeof nodeListenOptions.port === 'number' && parsedArgs['print-ip-address']) {
const ifaces = os.networkInterfaces();
Object.keys(ifaces).forEach(function (ifname) {
ifaces[ifname].forEach(function (iface) {
if (!iface.internal && iface.family === 'IPv4') {
output += `IP Address: ${iface.address}\n`;
}
});
});
}
address = server.address();
if (address === null) {
throw new Error('Unexpected server address');
}
output += `Server bound to ${typeof address === 'string' ? address : `${address.address}:${address.port} (${address.family})`}\n`;
// Do not change this line. VS Code looks for this in the output.
output += `Extension host agent listening on ${typeof address === 'string' ? address : address.port}\n`;
console.log(output);
perf.mark('code/server/started');
// @ts-ignore
global.vscodeServerListenTime = performance.now();
await getRemoteExtensionHostAgentServer();
});
process.on('exit', () => {
server.close();
if (_remoteExtensionHostAgentServer) {
_remoteExtensionHostAgentServer.dispose();
}
});
}
/**
* @param {any} val
* @returns {string | undefined}
*/
function sanitizeStringArg(val) {
if (Array.isArray(val)) { // if an argument is passed multiple times, minimist creates an array
val = val.pop(); // take the last item
}
return typeof val === 'string' ? val : undefined;
}
/**
* If `--pick-port` and `--port` is specified, connect to that port.
*
* If not and a port range is specified through `--pick-port`
* then find a free port in that range. Throw error if no
* free port available in range.
*
* If only `--port` is provided then connect to that port.
*
* In absence of specified ports, connect to port 8000.
* @param {string | undefined} host
* @param {string | undefined} strPort
* @param {string | undefined} strPickPort
* @returns {Promise<number>}
* @throws
*/
async function parsePort(host, strPort, strPickPort) {
let specificPort;
if (strPort) {
let range;
if (strPort.match(/^\d+$/)) {
specificPort = parseInt(strPort, 10);
if (specificPort === 0 || !strPickPort) {
return specificPort;
}
} else if (range = parseRange(strPort)) {
const port = await findFreePort(host, range.start, range.end);
if (port !== undefined) {
return port;
}
console.warn(`--port: Could not find free port in range: ${range.start} - ${range.end} (inclusive).`);
process.exit(1);
} else {
console.warn(`--port "${strPort}" is not a valid number or range. Ranges must be in the form 'from-to' with 'from' an integer larger than 0 and not larger than 'end'.`);
process.exit(1);
}
}
// pick-port is deprecated and will be removed soon
if (strPickPort) {
const range = parseRange(strPickPort);
if (range) {
if (range.start <= specificPort && specificPort <= range.end) {
return specificPort;
} else {
const port = await findFreePort(host, range.start, range.end);
if (port !== undefined) {
return port;
}
console.log(`--pick-port: Could not find free port in range: ${range.start} - ${range.end}.`);
process.exit(1);
}
} else {
console.log(`--pick-port "${strPickPort}" is not a valid range. Ranges must be in the form 'from-to' with 'from' an integer larger than 0 and not larger than 'end'.`);
process.exit(1);
}
}
return 8000;
}
/**
* @param {string} strRange
* @returns {{ start: number; end: number } | undefined}
*/
function parseRange(strRange) {
const match = strRange.match(/^(\d+)-(\d+)$/);
if (match) {
const start = parseInt(match[1], 10), end = parseInt(match[2], 10);
if (start > 0 && start <= end && end <= 65535) {
return { start, end };
}
}
return undefined;
}
/**
* Starting at the `start` port, look for a free port incrementing
* by 1 until `end` inclusive. If no free port is found, undefined is returned.
*
* @param {string | undefined} host
* @param {number} start
* @param {number} end
* @returns {Promise<number | undefined>}
* @throws
*/
async function findFreePort(host, start, end) {
const testPort = (port) => {
return new Promise((resolve) => {
const server = http.createServer();
server.listen(port, host, () => {
server.close();
resolve(true);
}).on('error', () => {
resolve(false);
});
});
};
for (let port = start; port <= end; port++) {
if (await testPort(port)) {
return port;
}
}
return undefined;
}
/** @returns { Promise<typeof import('./vs/server/node/server.main')> } */
function loadCode() {
return new Promise((resolve, reject) => {
const path = require('path');
delete process.env['ELECTRON_RUN_AS_NODE']; // Keep bootstrap-amd.js from redefining 'fs'.
// See https://github.com/microsoft/vscode-remote-release/issues/6543
// We would normally install a SIGPIPE listener in bootstrap.js
// But in certain situations, the console itself can be in a broken pipe state
// so logging SIGPIPE to the console will cause an infinite async loop
process.env['VSCODE_HANDLES_SIGPIPE'] = 'true';
if (process.env['VSCODE_DEV']) {
// When running out of sources, we need to load node modules from remote/node_modules,
// which are compiled against nodejs, not electron
process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'] = process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'] || path.join(__dirname, '..', 'remote', 'node_modules');
require('./bootstrap-node').injectNodeModuleLookupPath(process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH']);
} else {
delete process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'];
}
require('./bootstrap-amd').load('vs/server/node/server.main', resolve, reject);
});
}
function hasStdinWithoutTty() {
try {
return !process.stdin.isTTY; // Via https://twitter.com/MylesBorins/status/782009479382626304
} catch (error) {
// Windows workaround for https://github.com/nodejs/node/issues/11656
}
return false;
}
/**
* @param {string} question
* @returns { Promise<boolean> }
*/
function prompt(question) {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
return new Promise((resolve, reject) => {
rl.question(question + ' ', async function (data) {
rl.close();
const str = data.toString().trim().toLowerCase();
if (str === '' || str === 'y' || str === 'yes') {
resolve(true);
} else if (str === 'n' || str === 'no') {
resolve(false);
} else {
process.stdout.write('\nInvalid Response. Answer either yes (y, yes) or no (n, no)\n');
resolve(await prompt(question));
}
});
});
}
start();
@@ -74,8 +74,12 @@ export class ScrollableView extends Disposable {
super();
this.additionalScrollHeight = typeof options.additionalScrollHeight === 'undefined' ? 0 : options.additionalScrollHeight;
this.scrollable = new Scrollable({
forceIntegerValues: true,
smoothScrollDuration: getOrDefault(options, o => o.smoothScrolling, false) ? 125 : 0,
scheduleAtNextAnimationFrame: cb => DOM.scheduleAtNextAnimationFrame(cb)
});
this.scrollable = new Scrollable(getOrDefault(options, o => o.smoothScrolling, false) ? 125 : 0, cb => DOM.scheduleAtNextAnimationFrame(cb));
this.scrollableElement = this._register(new SmoothScrollableElement(this.viewContainer, {
alwaysConsumeMouseWheel: true,
horizontal: ScrollbarVisibility.Hidden,
@@ -36,7 +36,7 @@ export interface ITableEvent<T> {
}
export interface ITableMouseEvent<T> {
browserEvent: MouseEvent;
browserEvent: PointerEvent;
buttons: number;
element: T | undefined;
index: IGridPosition | undefined;
@@ -636,30 +636,31 @@ export class TableView<T> implements IDisposable {
delete this.visibleRows[index];
}
@memoize get onMouseClick(): Event<ITableMouseEvent<T>> { return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'click').event, e => this.toMouseEvent(e)); }
// {{SQL CARBON TODO}} - casting to PointerEvent?
@memoize get onMouseClick(): Event<ITableMouseEvent<T>> { return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'click').event, e => this.toMouseEvent(e as PointerEvent)); }
@memoize get onMouseDblClick(): Event<ITableMouseEvent<T>> {
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'dblclick').event, e => this.toMouseEvent(e));
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'dblclick').event, e => this.toMouseEvent(e as PointerEvent));
}
@memoize get onMouseMiddleClick(): Event<ITableMouseEvent<T>> {
return Event.filter(Event.map(this.createAndRegisterDomEmitter(this.domNode, 'auxclick').event, e => this.toMouseEvent(e as MouseEvent)), e => e.browserEvent.button === 1);
return Event.filter(Event.map(this.createAndRegisterDomEmitter(this.domNode, 'auxclick').event, e => this.toMouseEvent(e as PointerEvent)), e => e.browserEvent.button === 1);
}
@memoize get onMouseUp(): Event<ITableMouseEvent<T>> {
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mouseup').event, e => this.toMouseEvent(e));
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mouseup').event, e => this.toMouseEvent(e as PointerEvent));
}
@memoize get onMouseDown(): Event<ITableMouseEvent<T>> {
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mousedown').event, e => this.toMouseEvent(e));
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mousedown').event, e => this.toMouseEvent(e as PointerEvent));
}
@memoize get onMouseOver(): Event<ITableMouseEvent<T>> {
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mouseover').event, e => this.toMouseEvent(e));
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mouseover').event, e => this.toMouseEvent(e as PointerEvent));
}
@memoize get onMouseMove(): Event<ITableMouseEvent<T>> {
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mousemove').event, e => this.toMouseEvent(e));
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mousemove').event, e => this.toMouseEvent(e as PointerEvent));
}
@memoize get onMouseOut(): Event<ITableMouseEvent<T>> {
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mouseout').event, e => this.toMouseEvent(e));
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'mouseout').event, e => this.toMouseEvent(e as PointerEvent));
}
@memoize get onContextMenu(): Event<ITableMouseEvent<T>> {
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'contextmenu').event, e => this.toMouseEvent(e));
return Event.map(this.createAndRegisterDomEmitter(this.domNode, 'contextmenu').event, e => this.toMouseEvent(e as PointerEvent));
}
private createAndRegisterDomEmitter<K extends keyof DOMEventMap>(eventHandler: EventHandler, type: K): DomEmitter<K> {
@@ -668,7 +669,7 @@ export class TableView<T> implements IDisposable {
return emitter;
}
public toMouseEvent(browserEvent: MouseEvent): ITableMouseEvent<T> {
public toMouseEvent(browserEvent: PointerEvent): ITableMouseEvent<T> {
const index = this.getItemIndexFromEventTarget(browserEvent.target || null);
const item = typeof index === 'undefined' ? undefined : this.visibleRows[index.row];
const element = item && item.element;
@@ -20,9 +20,9 @@ import { Color } from 'vs/base/common/color';
import { getOrDefault } from 'vs/base/common/objects';
import { isNumber } from 'vs/base/common/types';
import { clamp } from 'vs/base/common/numbers';
import { GlobalMouseMoveMonitor } from 'vs/base/browser/globalMouseMoveMonitor';
import { GridPosition } from 'sql/base/common/gridPosition';
import { GridRange, IGridRange } from 'sql/base/common/gridRange';
import { GlobalPointerMoveMonitor } from 'vs/base/browser/globalPointerMoveMonitor';
interface ITraitChangeEvent {
indexes: IGridRange[];
@@ -437,7 +437,7 @@ export class MouseController<T> implements IDisposable {
readonly multipleSelectionController?: IMultipleSelectionController<T>;
private openController: IOpenController;
private disposables: IDisposable[] = [];
private readonly _mouseMoveMonitor = new GlobalMouseMoveMonitor<ITableMouseEvent<T>>();
private readonly _mouseMoveMonitor = new GlobalPointerMoveMonitor<ITableMouseEvent<T>>();
private startMouseEvent?: ITableMouseEvent<T>;
@@ -481,10 +481,10 @@ export class MouseController<T> implements IDisposable {
if (document.activeElement !== e.browserEvent.target) {
this.table.domFocus();
}
const merger = (lastEvent: ITableMouseEvent<T> | null, currentEvent: MouseEvent): ITableMouseEvent<T> => {
const merger = (lastEvent: ITableMouseEvent<T> | null, currentEvent: PointerEvent): ITableMouseEvent<T> => {
return this.view.toMouseEvent(currentEvent);
};
this._mouseMoveMonitor.startMonitoring(e.browserEvent.target as HTMLElement, e.buttons, merger, e => this.onMouseMove(e), () => this.onMouseStop());
this._mouseMoveMonitor.startMonitoring(e.browserEvent.target as HTMLElement, e.browserEvent.pointerId, e.buttons, merger, e => this.onMouseMove(e), () => this.onMouseStop());
this.onPointer(e);
}
@@ -273,8 +273,8 @@ export class CellSelectionModel<T> implements Slick.SelectionModel<T, Array<Slic
}
private handleKeyDown(e: KeyboardEvent) {
/***
* Кey codes
/*
* Key codes
* 37 left
* 38 up
* 39 right
@@ -128,7 +128,7 @@ export class CheckboxSelectColumn<T extends Slick.SlickData> implements Slick.Pl
this._grid.render();
this._grid.setActiveCell(row, this.index);
this.checkSelectAll();
if(this._options.actionOnCheck === ActionOnCheck.selectRow){
if (this._options.actionOnCheck === ActionOnCheck.selectRow) {
this.updateSelectedRows();
} else {
this._onChange.fire({ checked: false, row: row, column: this.index });
@@ -170,7 +170,7 @@ export class CheckboxSelectColumn<T extends Slick.SlickData> implements Slick.Pl
}
this._grid.updateColumnHeader(this._options.columnId!, `<input type="checkbox" tabIndex="0" ${this._headerCheckbox.checked ? 'checked' : ''} title=${HeaderCheckboxTitle}/>`, this._options.toolTip);
if(this._options.actionOnCheck === ActionOnCheck.selectRow){
if (this._options.actionOnCheck === ActionOnCheck.selectRow) {
this.updateSelectedRows();
}
this._grid.invalidateAllRows();
@@ -13,13 +13,12 @@ import { IResolvedTextEditorModel } from 'vs/editor/common/services/resolverServ
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
import { IUntitledTextEditorModel } from 'vs/workbench/services/untitled/common/untitledTextEditorModel';
import { EncodingMode } from 'vs/workbench/services/textfile/common/textfiles';
import { GroupIdentifier, ISaveOptions, EditorInputCapabilities } from 'vs/workbench/common/editor';
import { GroupIdentifier, ISaveOptions, EditorInputCapabilities, IUntypedEditorInput } from 'vs/workbench/common/editor';
import { FileQueryEditorInput } from 'sql/workbench/contrib/query/browser/fileQueryEditorInput';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { FileEditorInput } from 'vs/workbench/contrib/files/browser/editors/fileEditorInput';
import { UNTITLED_QUERY_EDITOR_TYPEID } from 'sql/workbench/common/constants';
import { IUntitledQueryEditorInput } from 'sql/base/query/common/untitledQueryEditorInput';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
export class UntitledQueryEditorInput extends QueryEditorInput implements IUntitledQueryEditorInput {
@@ -38,7 +37,7 @@ export class UntitledQueryEditorInput extends QueryEditorInput implements IUntit
// Set the mode explicitely to stop the auto language detection service from changing the mode unexpectedly.
// the auto language detection service won't do the language change only if the mode is explicitely set.
// if the mode (e.g. kusto, sql) do not exist for whatever reason, we will default it to sql.
text.setMode(text.getMode() ?? 'sql');
text.setLanguageId(text.getLanguageId() ?? 'sql');
}
public override resolve(): Promise<IUntitledTextEditorModel & IResolvedTextEditorModel> {
@@ -53,20 +52,20 @@ export class UntitledQueryEditorInput extends QueryEditorInput implements IUntit
return this.text.model.hasAssociatedFilePath;
}
override async save(group: GroupIdentifier, options?: ISaveOptions): Promise<EditorInput | undefined> {
override async save(group: GroupIdentifier, options?: ISaveOptions): Promise<IUntypedEditorInput | undefined> {
let fileEditorInput = await this.text.save(group, options);
return this.createFileQueryEditorInput(fileEditorInput);
}
override async saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise<EditorInput | undefined> {
override async saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise<IUntypedEditorInput | undefined> {
let fileEditorInput = await this.text.saveAs(group, options);
return this.createFileQueryEditorInput(fileEditorInput);
}
private async createFileQueryEditorInput(fileEditorInput: EditorInput): Promise<EditorInput> {
private async createFileQueryEditorInput(fileEditorInput: IUntypedEditorInput): Promise<IUntypedEditorInput> {
// Create our own FileQueryEditorInput wrapper here so that the existing state (connection, results, etc) can be transferred from this input to the new file input.
try {
let newUri = fileEditorInput.resource.toString(true);
let newUri = (<any>fileEditorInput).resource.toString(true);
await this.changeConnectionUri(newUri);
this._results.uri = newUri;
let newInput = this.instantiationService.createInstance(FileQueryEditorInput, '', (fileEditorInput as FileEditorInput), this.results);
@@ -85,11 +84,11 @@ export class UntitledQueryEditorInput extends QueryEditorInput implements IUntit
}
public setMode(mode: string): void {
this.text.setMode(mode);
this.text.setLanguageId(mode);
}
public getMode(): string | undefined {
return this.text.getMode();
return this.text.getLanguageId();
}
override get typeId(): string {
+2 -2
View File
@@ -3,13 +3,13 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as editorCommon from 'vs/editor/common/editorCommon';
import { ILineChange } from 'vs/editor/common/diff/diffComputer';
/**
* Swaps the original and modified line changes
* @param lineChanges The line changes to be reversed
*/
export function reverseLineChanges(lineChanges: editorCommon.ILineChange[]): editorCommon.ILineChange[] {
export function reverseLineChanges(lineChanges: ILineChange[]): ILineChange[] {
let reversedLineChanges = lineChanges.map(linechange => {
return {
modifiedStartLineNumber: linechange.originalStartLineNumber,
@@ -6,7 +6,8 @@
import { asCSSUrl, createCSSRule } from 'vs/base/browser/dom';
import { IdGenerator } from 'vs/base/common/idGenerator';
import { IDisposable, toDisposable, dispose } from 'vs/base/common/lifecycle';
import { ICommandAction, MenuItemAction } from 'vs/platform/actions/common/actions';
import { MenuItemAction } from 'vs/platform/actions/common/actions';
import { ICommandAction } from 'vs/platform/action/common/action';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
@@ -4,8 +4,9 @@
*--------------------------------------------------------------------------------------------*/
import { Emitter } from 'vs/base/common/event';
import { ConfigurationTarget, getConfigurationKeys, getConfigurationValue, IConfigurationChangeEvent, IConfigurationOverrides, IConfigurationService, IConfigurationValue } from 'vs/platform/configuration/common/configuration';
import { ConfigurationTarget, getConfigurationValue, IConfigurationChangeEvent, IConfigurationOverrides, IConfigurationService, IConfigurationValue } from 'vs/platform/configuration/common/configuration';
import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry';
import { Registry } from 'vs/platform/registry/common/platform';
export class TestConfigurationService implements IConfigurationService {
public onDidChangeConfigurationEmitter = new Emitter<IConfigurationChangeEvent>();
@@ -61,7 +62,7 @@ export class TestConfigurationService implements IConfigurationService {
public keys() {
return {
default: getConfigurationKeys(),
default: Object.keys(Registry.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurationProperties()),
user: Object.keys(this.configuration),
workspace: [],
workspaceFolder: []
@@ -4,9 +4,9 @@
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import { IAdsTelemetryService, ITelemetryInfo, ITelemetryEvent, ITelemetryEventMeasures, ITelemetryEventProperties } from 'sql/platform/telemetry/common/telemetry';
import { IAdsTelemetryService, ITelemetryEvent, ITelemetryEventMeasures, ITelemetryEventProperties } from 'sql/platform/telemetry/common/telemetry';
import { ILogService } from 'vs/platform/log/common/log';
import { ITelemetryService, TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
import { ITelemetryInfo, ITelemetryService, TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
import { EventName } from 'sql/platform/telemetry/common/telemetryKeys';
@@ -90,15 +90,16 @@ export class AdsTelemetryService implements IAdsTelemetryService {
) { }
setEnabled(value: boolean): void {
if (value) {
this.telemetryService.telemetryLevel = TelemetryLevel.USAGE;
} else {
this.telemetryService.telemetryLevel = TelemetryLevel.NONE;
}
// if (value) {
// this.telemetryService.telemetryLevel = TelemetryLevel.USAGE;
// } else {
// this.telemetryService.telemetryLevel = TelemetryLevel.NONE;
// }
throw "Telemetry level is readonly";
}
get isOptedIn(): boolean {
return this.telemetryService.telemetryLevel !== TelemetryLevel.NONE;
return this.telemetryService.telemetryLevel.value !== TelemetryLevel.NONE;
}
getTelemetryInfo(): Promise<ITelemetryInfo> {
@@ -231,7 +232,8 @@ export class NullAdsTelemetryService implements IAdsTelemetryService {
return Promise.resolve({
sessionId: '',
machineId: '',
instanceId: ''
firstSessionDate: '',
msftInternal: false
});
}
createViewEvent(view: string): ITelemetryEvent { return new NullTelemetryEventImpl(); }
@@ -5,6 +5,7 @@
import * as azdata from 'azdata';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
export const IAdsTelemetryService = createDecorator<IAdsTelemetryService>('adsTelemetryService');
@@ -53,12 +54,6 @@ export interface ITelemetryEvent {
withServerInfo(serverInfo?: azdata.ServerInfo): ITelemetryEvent;
}
export interface ITelemetryInfo {
sessionId: string;
machineId: string;
instanceId: string;
}
export interface IAdsTelemetryService {
// ITelemetryService functions
+48 -48
View File
@@ -8,7 +8,7 @@ import { Color, RGBA } from 'vs/base/common/color';
import * as nls from 'vs/nls';
// Common
export const GroupHeaderBackground = registerColor('groupHeaderBackground', { dark: '#252526', light: '#F3F3F3', hc: '#000000' }, nls.localize('groupHeaderBackground', "Background color of the group header."));
export const GroupHeaderBackground = registerColor('groupHeaderBackground', { dark: '#252526', light: '#F3F3F3', hcDark: '#000000', hcLight: '#000000' }, nls.localize('groupHeaderBackground', "Background color of the group header."));
// -- Welcome Page Colors
export const tileBoxShadowColor = new Color(new RGBA(0, 1, 4, 0.13));
@@ -21,73 +21,73 @@ export const gradientTwoColorOne = new Color(new RGBA(156, 48, 48, 0));
export const gradientTwoColorTwo = new Color(new RGBA(255, 255, 255, 0.1));
// -- Tiles
export const tileBorder = registerColor('tileBorder', { light: '#fff', dark: '#8A8886', hc: '#2B56F2' }, nls.localize('tileBorder', "The border color of tiles"));
export const tileBoxShadow = registerColor('tileBoxShadow', { light: tileBoxShadowColor, dark: tileBoxShadowColor, hc: tileBoxShadowColor }, nls.localize('tileBoxShadow', "The tile box shadow color"));
export const tileBorder = registerColor('tileBorder', { light: '#fff', dark: '#8A8886', hcDark: '#2B56F2', hcLight: '#2B56F2' }, nls.localize('tileBorder', "The border color of tiles"));
export const tileBoxShadow = registerColor('tileBoxShadow', { light: tileBoxShadowColor, dark: tileBoxShadowColor, hcDark: tileBoxShadowColor, hcLight: tileBoxShadowColor }, nls.localize('tileBoxShadow', "The tile box shadow color"));
// -- Buttons
export const buttonDropdownBackgroundHover = registerColor('buttonDropdownBackgroundHover', { light: '#3062d6', dark: '#3062d6', hc: '#3062d6' }, nls.localize('buttonDropdownBackgroundHover', "The button dropdown background hover color"));
export const buttonDropdownBackgroundHover = registerColor('buttonDropdownBackgroundHover', { light: '#3062d6', dark: '#3062d6', hcDark: '#3062d6', hcLight: '#3062d6' }, nls.localize('buttonDropdownBackgroundHover', "The button dropdown background hover color"));
// -- Shadows
export const hoverShadow = registerColor('buttonDropdownBoxShadow', { light: dropdownBoxShadow, dark: dropdownBoxShadow, hc: dropdownBoxShadow }, nls.localize('buttonDropdownBoxShadow', "The button dropdown box shadow color"));
export const extensionPackHeaderShadow = registerColor('extensionPackHeaderShadow', { light: textShadow, dark: textShadow, hc: textShadow }, nls.localize('extensionPackHeaderShadow', "The extension pack header text shadowcolor"));
export const hoverShadow = registerColor('buttonDropdownBoxShadow', { light: dropdownBoxShadow, dark: dropdownBoxShadow, hcDark: dropdownBoxShadow, hcLight: dropdownBoxShadow }, nls.localize('buttonDropdo0wnBoxShadow', "The button dropdown box shadow color"));
export const extensionPackHeaderShadow = registerColor('extensionPackHeaderShadow', { light: textShadow, dark: textShadow, hcDark: textShadow, hcLight: textShadow }, nls.localize('extensionPackHeaderShadow', "The extension pack header text shadowcolor"));
// -- Gradients
export const extensionPackGradientColorOneColor = registerColor('extensionPackGradientColorOne', { light: extensionPackGradientOne, dark: extensionPackGradientOne, hc: extensionPackGradientOne }, nls.localize('extensionPackGradientColorOne', "The top color for the extension pack gradient"));
export const extensionPackGradientColorTwoColor = registerColor('extensionPackGradientColorTwo', { light: extensionPackGradientTwo, dark: extensionPackGradientTwo, hc: extensionPackGradientTwo }, nls.localize('extensionPackGradientColorTwo', "The bottom color for the extension pack gradient"));
export const gradientOne = registerColor('gradientOne', { light: '#f0f0f0', dark: gradientOneColorOne, hc: gradientOneColorOne }, nls.localize('gradientOne', "The top color for the banner image gradient"));
export const gradientTwo = registerColor('gradientTwo', { light: gradientTwoColorOne, dark: gradientTwoColorTwo, hc: gradientTwoColorTwo }, nls.localize('gradientTwo', "The bottom color for the banner image gradient"));
export const gradientBackground = registerColor('gradientBackground', { light: '#fff', dark: 'transparent', hc: 'transparent' }, nls.localize('gradientBackground', "The background color for the banner image gradient"));
export const extensionPackGradientColorOneColor = registerColor('extensionPackGradientColorOne', { light: extensionPackGradientOne, dark: extensionPackGradientOne, hcDark: extensionPackGradientOne, hcLight: extensionPackGradientOne }, nls.localize('extensionPackGradientColorOne', "The top color for the extension pack gradient"));
export const extensionPackGradientColorTwoColor = registerColor('extensionPackGradientColorTwo', { light: extensionPackGradientTwo, dark: extensionPackGradientTwo, hcDark: extensionPackGradientTwo, hcLight: extensionPackGradientTwo }, nls.localize('extensionPackGradientColorTwo', "The bottom color for the extension pack gradient"));
export const gradientOne = registerColor('gradientOne', { light: '#f0f0f0', dark: gradientOneColorOne, hcDark: gradientOneColorOne, hcLight: gradientOneColorOne }, nls.localize('gradientOne', "The top color for the banner image gradient"));
export const gradientTwo = registerColor('gradientTwo', { light: gradientTwoColorOne, dark: gradientTwoColorTwo, hcDark: gradientTwoColorTwo, hcLight: gradientTwoColorTwo }, nls.localize('gradientTwo', "The bottom color for the banner image gradient"));
export const gradientBackground = registerColor('gradientBackground', { light: '#fff', dark: 'transparent', hcDark: 'transparent', hcLight: 'transparent' }, nls.localize('gradientBackground', "The background color for the banner image gradient"));
// --- Notebook Colors
export const notebookToolbarIcon = registerColor('notebook.notebookToolbarIcon', { light: '#0078D4', dark: '#3AA0F3', hc: '#FFFFFF' }, nls.localize('notebook.notebookToolbarIcon', "Notebook: Main toolbar icons"));
export const notebookToolbarSelectBorder = registerColor('notebook.notebookToolbarSelectBorder', { light: '#A5A5A5', dark: '#8A8886', hc: '#2B56F2' }, nls.localize('notebook.notebookToolbarSelectBorder', "Notebook: Main toolbar select box border"));
export const notebookToolbarSelectBackground = registerColor('notebook.notebookToolbarSelectBackground', { light: '#FFFFFF', dark: '#1B1A19', hc: '#000000' }, nls.localize('notebook.notebookToolbarSelectBackground', "Notebook: Main toolbar select box background"));
export const notebookToolbarLines = registerColor('notebook.notebookToolbarLines', { light: '#D6D6D6', dark: '#323130', hc: '#2B56F2' }, nls.localize('notebook.notebookToolbarLines', "Notebook: Main toolbar bottom border and separator"));
export const dropdownArrow = registerColor('notebook.dropdownArrow', { light: '#A5A5A5', dark: '#FFFFFF', hc: '#FFFFFF' }, nls.localize('notebook.dropdownArrow', "Notebook: Main toolbar dropdown arrow"));
export const buttonMenuArrow = registerColor('notebook.buttonMenuArrow', { light: '#000000', dark: '#FFFFFF', hc: '#FFFFFF' }, nls.localize('notebook.buttonMenuArrow', "Notebook: Main toolbar custom buttonMenu dropdown arrow"));
export const notebookToolbarIcon = registerColor('notebook.notebookToolbarIcon', { light: '#0078D4', dark: '#3AA0F3', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('notebook.notebookToolbarIcon', "Notebook: Main toolbar icons"));
export const notebookToolbarSelectBorder = registerColor('notebook.notebookToolbarSelectBorder', { light: '#A5A5A5', dark: '#8A8886', hcDark: '#2B56F2', hcLight: '#2B56F2' }, nls.localize('notebook.notebookToolbarSelectBorder', "Notebook: Main toolbar select box border"));
export const notebookToolbarSelectBackground = registerColor('notebook.notebookToolbarSelectBackground', { light: '#FFFFFF', dark: '#1B1A19', hcDark: '#000000', hcLight: '#000000' }, nls.localize('notebook.notebookToolbarSelectBackground', "Notebook: Main toolbar select box background"));
export const notebookToolbarLines = registerColor('notebook.notebookToolbarLines', { light: '#D6D6D6', dark: '#323130', hcDark: '#2B56F2', hcLight: '#2B56F2' }, nls.localize('notebook.notebookToolbarLines', "Notebook: Main toolbar bottom border and separator"));
export const dropdownArrow = registerColor('notebook.dropdownArrow', { light: '#A5A5A5', dark: '#FFFFFF', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('notebook.dropdownArrow', "Notebook: Main toolbar dropdown arrow"));
export const buttonMenuArrow = registerColor('notebook.buttonMenuArrow', { light: '#000000', dark: '#FFFFFF', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('notebook.buttonMenuArrow', "Notebook: Main toolbar custom buttonMenu dropdown arrow"));
export const toolbarBackground = registerColor('notebook.toolbarBackground', { light: '#F5F5F5', dark: '#252423', hc: '#000000' }, nls.localize('notebook.toolbarBackground', "Notebook: Markdown toolbar background"));
export const toolbarIcon = registerColor('notebook.toolbarIcon', { light: '#323130', dark: '#FFFFFF', hc: '#FFFFFF' }, nls.localize('notebook.toolbarIcon', "Notebook: Markdown toolbar icons"));
export const toolbarBottomBorder = registerColor('notebook.toolbarBottomBorder', { light: '#D4D4D4', dark: '#323130', hc: '#E86E58' }, nls.localize('notebook.toolbarBottomBorder', "Notebook: Markdown toolbar bottom border"));
export const toolbarBackground = registerColor('notebook.toolbarBackground', { light: '#F5F5F5', dark: '#252423', hcDark: '#000000', hcLight: '#000000' }, nls.localize('notebook.toolbarBackground', "Notebook: Markdown toolbar background"));
export const toolbarIcon = registerColor('notebook.toolbarIcon', { light: '#323130', dark: '#FFFFFF', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('notebook.toolbarIcon', "Notebook: Markdown toolbar icons"));
export const toolbarBottomBorder = registerColor('notebook.toolbarBottomBorder', { light: '#D4D4D4', dark: '#323130', hcDark: '#E86E58', hcLight: '#E86E58' }, nls.localize('notebook.toolbarBottomBorder', "Notebook: Markdown toolbar bottom border"));
// Notebook: All cells
export const cellBorder = registerColor('notebook.cellBorder', { light: '#0078D4', dark: '#3AA0F3', hc: '#E86E58' }, nls.localize('notebook.cellBorder', "Notebook: Active cell border"));
export const cellBorder = registerColor('notebook.cellBorder', { light: '#0078D4', dark: '#3AA0F3', hcDark: '#E86E58', hcLight: '#E86E58' }, nls.localize('notebook.cellBorder', "Notebook: Active cell border"));
// Notebook: Markdown cell
export const markdownEditorBackground = registerColor('notebook.markdownEditorBackground', { light: '#FFFFFF', dark: '#1B1A19', hc: '#000000' }, nls.localize('notebook.markdownEditorBackground', "Notebook: Markdown editor background"));
export const splitBorder = registerColor('notebook.splitBorder', { light: '#E6E6E6', dark: '#323130', hc: '#872412' }, nls.localize('notebook.splitBorder', "Notebook: Border between Markdown editor and preview"));
export const markdownEditorBackground = registerColor('notebook.markdownEditorBackground', { light: '#FFFFFF', dark: '#1B1A19', hcDark: '#000000', hcLight: '#000000' }, nls.localize('notebook.markdownEditorBackground', "Notebook: Markdown editor background"));
export const splitBorder = registerColor('notebook.splitBorder', { light: '#E6E6E6', dark: '#323130', hcDark: '#872412', hcLight: '#872412' }, nls.localize('notebook.splitBorder', "Notebook: Border between Markdown editor and preview"));
// Notebook: Code cell
export const codeEditorBackground = registerColor('notebook.codeEditorBackground', { light: '#F5F5F5', dark: '#333333', hc: '#000000' }, nls.localize('notebook.codeEditorBackground', "Notebook: Code editor background"));
export const codeEditorBackgroundActive = registerColor('notebook.codeEditorBackgroundActive', { light: '#FFFFFF', dark: null, hc: null }, nls.localize('notebook.codeEditorBackgroundActive', "Notebook: Code editor background of active cell"));
export const codeEditorLineNumber = registerColor('notebook.codeEditorLineNumber', { light: '#A19F9D', dark: '#A19F9D', hc: '#FFFFFF' }, nls.localize('notebook.codeEditorLineNumber', "Notebook: Code editor line numbers"));
export const codeEditorToolbarIcon = registerColor('notebook.codeEditorToolbarIcon', { light: '#999999', dark: '#A19F9D', hc: '#FFFFFF' }, nls.localize('notebook.codeEditorToolbarIcon', "Notebook: Code editor toolbar icons"));
export const codeEditorToolbarBackground = registerColor('notebook.codeEditorToolbarBackground', { light: '#EEEEEE', dark: '#333333', hc: '#000000' }, nls.localize('notebook.codeEditorToolbarBackground', "Notebook: Code editor toolbar background"));
export const codeEditorToolbarBorder = registerColor('notebook.codeEditorToolbarBorder', { light: '#C8C6C4', dark: '#333333', hc: '#000000' }, nls.localize('notebook.codeEditorToolbarBorder', "Notebook: Code editor toolbar right border"));
export const notebookCellTagBackground = registerColor('notebook.notebookCellTagBackground', { light: '#0078D4', dark: '#0078D4', hc: '#0078D4' }, nls.localize('notebook.notebookCellTagBackground', "Tag background color."));
export const notebookCellTagForeground = registerColor('notebook.notebookCellTagForeground', { light: '#FFFFFF', dark: '#FFFFFF', hc: '#FFFFFF' }, nls.localize('notebook.notebookCellTagForeground', "Tag foreground color."));
export const codeEditorBackground = registerColor('notebook.codeEditorBackground', { light: '#F5F5F5', dark: '#333333', hcDark: '#000000', hcLight: '#000000' }, nls.localize('notebook.codeEditorBackground', "Notebook: Code editor background"));
export const codeEditorBackgroundActive = registerColor('notebook.codeEditorBackgroundActive', { light: '#FFFFFF', dark: null, hcDark: null, hcLight: null }, nls.localize('notebook.codeEditorBackgroundActive', "Notebook: Code editor background of active cell"));
export const codeEditorLineNumber = registerColor('notebook.codeEditorLineNumber', { light: '#A19F9D', dark: '#A19F9D', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('notebook.codeEditorLineNumber', "Notebook: Code editor line numbers"));
export const codeEditorToolbarIcon = registerColor('notebook.codeEditorToolbarIcon', { light: '#999999', dark: '#A19F9D', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('notebook.codeEditorToolbarIcon', "Notebook: Code editor toolbar icons"));
export const codeEditorToolbarBackground = registerColor('notebook.codeEditorToolbarBackground', { light: '#EEEEEE', dark: '#333333', hcDark: '#000000', hcLight: '#000000' }, nls.localize('notebook.codeEditorToolbarBackground', "Notebook: Code editor toolbar background"));
export const codeEditorToolbarBorder = registerColor('notebook.codeEditorToolbarBorder', { light: '#C8C6C4', dark: '#333333', hcDark: '#000000', hcLight: '#000000' }, nls.localize('notebook.codeEditorToolbarBorder', "Notebook: Code editor toolbar right border"));
export const notebookCellTagBackground = registerColor('notebook.notebookCellTagBackground', { light: '#0078D4', dark: '#0078D4', hcDark: '#0078D4', hcLight: '#0078D4' }, nls.localize('notebook.notebookCellTagBackground', "Tag background color."));
export const notebookCellTagForeground = registerColor('notebook.notebookCellTagForeground', { light: '#FFFFFF', dark: '#FFFFFF', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('notebook.notebookCellTagForeground', "Tag foreground color."));
// Notebook: Find
export const notebookFindMatchHighlight = registerColor('notebook.findMatchHighlightBackground', { light: '#FFFF00', dark: '#FFFF00', hc: null }, nls.localize('notebookFindMatchHighlight', "Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."), true);
export const notebookFindRangeHighlight = registerColor('notebook.findRangeHighlightBackground', { dark: '#FFA500', light: '#FFA500', hc: null }, nls.localize('notebookFindRangeHighlight', "Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."), true);
export const notebookFindMatchHighlight = registerColor('notebook.findMatchHighlightBackground', { light: '#FFFF00', dark: '#FFFF00', hcDark: null, hcLight: null }, nls.localize('notebookFindMatchHighlight', "Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."), true);
export const notebookFindRangeHighlight = registerColor('notebook.findRangeHighlightBackground', { dark: '#FFA500', light: '#FFA500', hcDark: null, hcLight: null }, nls.localize('notebookFindRangeHighlight', "Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."), true);
// Info Box
export const infoBoxInformationBackground = registerColor('infoBox.infomationBackground', { light: '#F0F6FF', dark: '#001433', hc: '#000000' }, nls.localize('infoBox.infomationBackground', "InfoBox: The background color when the notification type is information."));
export const infoBoxWarningBackground = registerColor('infoBox.warningBackground', { light: '#FFF8F0', dark: '#331B00', hc: '#000000' }, nls.localize('infoBox.warningBackground', "InfoBox: The background color when the notification type is warning."));
export const infoBoxErrorBackground = registerColor('infoBox.errorBackground', { light: '#FEF0F1', dark: '#300306', hc: '#000000' }, nls.localize('infoBox.errorBackground', "InfoBox: The background color when the notification type is error."));
export const infoBoxSuccessBackground = registerColor('infoBox.successBackground', { light: '#F8FFF0', dark: '#1B3300', hc: '#000000' }, nls.localize('infoBox.successBackground', "InfoBox: The background color when the notification type is success."));
export const infoBoxInformationBackground = registerColor('infoBox.infomationBackground', { light: '#F0F6FF', dark: '#001433', hcDark: '#000000', hcLight: '#000000' }, nls.localize('infoBox.infomationBackground', "InfoBox: The background color when the notification type is information."));
export const infoBoxWarningBackground = registerColor('infoBox.warningBackground', { light: '#FFF8F0', dark: '#331B00', hcDark: '#000000', hcLight: '#000000' }, nls.localize('infoBox.warningBackground', "InfoBox: The background color when the notification type is warning."));
export const infoBoxErrorBackground = registerColor('infoBox.errorBackground', { light: '#FEF0F1', dark: '#300306', hcDark: '#000000', hcLight: '#000000' }, nls.localize('infoBox.errorBackground', "InfoBox: The background color when the notification type is error."));
export const infoBoxSuccessBackground = registerColor('infoBox.successBackground', { light: '#F8FFF0', dark: '#1B3300', hcDark: '#000000', hcLight: '#000000' }, nls.localize('infoBox.successBackground', "InfoBox: The background color when the notification type is success."));
// Info Button
export const infoButtonForeground = registerColor('infoButton.foreground', { dark: '#FFFFFF', light: '#000000', hc: '#FFFFFF' }, nls.localize('infoButton.foreground', "Info button foreground color."));
export const infoButtonBackground = registerColor('infoButton.background', { dark: '#1B1A19', light: '#FFFFFF', hc: '#000000' }, nls.localize('infoButton.background', "Info button background color."));
export const infoButtonBorder = registerColor('infoButton.border', { dark: '#1B1A19', light: '#FFFFFF', hc: contrastBorder }, nls.localize('infoButton.border', "Info button border color."));
export const infoButtonHoverBackground = registerColor('infoButton.hoverBackground', { dark: '#282625', light: '#F3F2F1', hc: '#000000' }, nls.localize('infoButton.hoverBackground', "Info button hover background color."));
export const infoButtonForeground = registerColor('infoButton.foreground', { dark: '#FFFFFF', light: '#000000', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('infoButton.foreground', "Info button foreground color."));
export const infoButtonBackground = registerColor('infoButton.background', { dark: '#1B1A19', light: '#FFFFFF', hcDark: '#000000', hcLight: '#000000' }, nls.localize('infoButton.background', "Info button background color."));
export const infoButtonBorder = registerColor('infoButton.border', { dark: '#1B1A19', light: '#FFFFFF', hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('infoButton.border', "Info button border color."));
export const infoButtonHoverBackground = registerColor('infoButton.hoverBackground', { dark: '#282625', light: '#F3F2F1', hcDark: '#000000', hcLight: '#000000' }, nls.localize('infoButton.hoverBackground', "Info button hover background color."));
// Callout Dialog
export const calloutDialogForeground = registerColor('calloutDialog.foreground', { light: '#616161', dark: '#CCCCCC', hc: '#FFFFFF' }, nls.localize('calloutDialogForeground', 'Callout dialog foreground.'));
export const calloutDialogInteriorBorder = registerColor('calloutDialog.interiorBorder', { light: '#D6D6D6', dark: '#323130', hc: '#2B56F2' }, nls.localize('calloutDialogInteriorBorder', "Callout dialog interior borders used for separating elements."));
export const calloutDialogExteriorBorder = registerColor('calloutDialog.exteriorBorder', { light: '#CCCCCC', dark: '#CCCCCC', hc: '#2B56F2' }, nls.localize('calloutDialogExteriorBorder', "Callout dialog exterior borders to provide contrast against notebook UI."));
export const calloutDialogHeaderFooterBackground = registerColor('calloutDialog.headerFooterBackground', { light: '#FFFFFF', dark: '#1E1E1E', hc: Color.black }, nls.localize('calloutDialogHeaderFooterBackground', 'Callout dialog header and footer background.'));
export const calloutDialogBodyBackground = registerColor('calloutDialog.bodyBackground', { light: '#FFFFFF', dark: '#1E1E1E', hc: Color.black }, nls.localize('calloutDialogBodyBackground', "Callout dialog body background."));
export const calloutDialogShadowColor = registerColor('calloutDialog.shadow', { light: '#000000', dark: '#FFFFFF', hc: '#000000' }, nls.localize('calloutDialogShadowColor', 'Callout dialog box shadow color.'));
export const calloutDialogForeground = registerColor('calloutDialog.foreground', { light: '#616161', dark: '#CCCCCC', hcDark: '#FFFFFF', hcLight: '#FFFFFF' }, nls.localize('calloutDialogForeground', 'Callout dialog foreground.'));
export const calloutDialogInteriorBorder = registerColor('calloutDialog.interiorBorder', { light: '#D6D6D6', dark: '#323130', hcDark: '#2B56F2', hcLight: '#2B56F2' }, nls.localize('calloutDialogInteriorBorder', "Callout dialog interior borders used for separating elements."));
export const calloutDialogExteriorBorder = registerColor('calloutDialog.exteriorBorder', { light: '#CCCCCC', dark: '#CCCCCC', hcDark: '#2B56F2', hcLight: '#2B56F2' }, nls.localize('calloutDialogExteriorBorder', "Callout dialog exterior borders to provide contrast against notebook UI."));
export const calloutDialogHeaderFooterBackground = registerColor('calloutDialog.headerFooterBackground', { light: '#FFFFFF', dark: '#1E1E1E', hcDark: Color.black, hcLight: Color.black }, nls.localize('calloutDialogHeaderFooterBackground', 'Callout dialog header and footer background.'));
export const calloutDialogBodyBackground = registerColor('calloutDialog.bodyBackground', { light: '#FFFFFF', dark: '#1E1E1E', hcDark: Color.black, hcLight: Color.black }, nls.localize('calloutDialogBodyBackground', "Callout dialog body background."));
export const calloutDialogShadowColor = registerColor('calloutDialog.shadow', { light: '#000000', dark: '#FFFFFF', hcDark: '#000000', hcLight: '#000000' }, nls.localize('calloutDialogShadowColor', 'Callout dialog box shadow color.'));
// Designer
export const DesignerPaneSeparator = registerColor('designer.paneSeparator', { light: '#DDDDDD', dark: '#8A8886', hc: contrastBorder }, nls.localize('designer.paneSeparator', 'The pane separator color.'));
export const DesignerPaneSeparator = registerColor('designer.paneSeparator', { light: '#DDDDDD', dark: '#8A8886', hcDark: contrastBorder, hcLight: '#000000' }, nls.localize('designer.paneSeparator', 'The pane separator color.'));
+14 -14
View File
@@ -7,22 +7,22 @@ import { registerColor, foreground } from 'vs/platform/theme/common/colorRegistr
import { Color, RGBA } from 'vs/base/common/color';
import * as nls from 'vs/nls';
export const tableHeaderBackground = registerColor('table.headerBackground', { dark: new Color(new RGBA(51, 51, 52)), light: new Color(new RGBA(245, 245, 245)), hc: '#333334' }, nls.localize('tableHeaderBackground', "Table header background color"));
export const tableHeaderForeground = registerColor('table.headerForeground', { dark: new Color(new RGBA(229, 229, 229)), light: new Color(new RGBA(16, 16, 16)), hc: '#e5e5e5' }, nls.localize('tableHeaderForeground', "Table header foreground color"));
export const listFocusAndSelectionBackground = registerColor('list.focusAndSelectionBackground', { dark: '#2c3295', light: '#2c3295', hc: null }, nls.localize('listFocusAndSelectionBackground', "List/Table background color for the selected and focus item when the list/table is active"));
export const tableCellOutline = registerColor('table.cell.outline', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('tableCellOutline', 'Color of the outline of a cell.'));
export const tableHeaderBackground = registerColor('table.headerBackground', { dark: new Color(new RGBA(51, 51, 52)), light: new Color(new RGBA(245, 245, 245)), hcDark: '#333334', hcLight: '#333334' }, nls.localize('tableHeaderBackground', "Table header background color"));
export const tableHeaderForeground = registerColor('table.headerForeground', { dark: new Color(new RGBA(229, 229, 229)), light: new Color(new RGBA(16, 16, 16)), hcDark: '#e5e5e5', hcLight: '#e5e5e5' }, nls.localize('tableHeaderForeground', "Table header foreground color"));
export const listFocusAndSelectionBackground = registerColor('list.focusAndSelectionBackground', { dark: '#2c3295', light: '#2c3295', hcDark: null, hcLight: null }, nls.localize('listFocusAndSelectionBackground', "List/Table background color for the selected and focus item when the list/table is active"));
export const tableCellOutline = registerColor('table.cell.outline', { dark: '#e3e4e229', light: '#33333333', hcDark: '#e3e4e229', hcLight: '#e3e4e229' }, nls.localize('tableCellOutline', 'Color of the outline of a cell.'));
export const disabledInputBackground = registerColor('input.disabled.background', { dark: '#444444', light: '#dcdcdc', hc: Color.black }, nls.localize('disabledInputBoxBackground', "Disabled Input box background."));
export const disabledInputForeground = registerColor('input.disabled.foreground', { dark: '#888888', light: '#888888', hc: foreground }, nls.localize('disabledInputBoxForeground', "Disabled Input box foreground."));
export const buttonFocusOutline = registerColor('button.focusOutline', { dark: '#eaeaea', light: '#666666', hc: null }, nls.localize('buttonFocusOutline', "Button outline color when focused."));
export const disabledCheckboxForeground = registerColor('checkbox.disabled.foreground', { dark: '#888888', light: '#888888', hc: Color.black }, nls.localize('disabledCheckboxforeground', "Disabled checkbox foreground."));
export const disabledInputBackground = registerColor('input.disabled.background', { dark: '#444444', light: '#dcdcdc', hcDark: Color.black, hcLight: Color.black }, nls.localize('disabledInputBoxBackground', "Disabled Input box background."));
export const disabledInputForeground = registerColor('input.disabled.foreground', { dark: '#888888', light: '#888888', hcDark: foreground, hcLight: foreground }, nls.localize('disabledInputBoxForeground', "Disabled Input box foreground."));
export const buttonFocusOutline = registerColor('button.focusOutline', { dark: '#eaeaea', light: '#666666', hcDark: null, hcLight: null }, nls.localize('buttonFocusOutline', "Button outline color when focused."));
export const disabledCheckboxForeground = registerColor('checkbox.disabled.foreground', { dark: '#888888', light: '#888888', hcDark: Color.black, hcLight: Color.black }, nls.localize('disabledCheckboxforeground', "Disabled checkbox foreground."));
// SQL Agent Colors
export const tableBackground = registerColor('agent.tableBackground', { light: '#fffffe', dark: '#333333', hc: Color.black }, nls.localize('agentTableBackground', "SQL Agent Table background color."));
export const cellBackground = registerColor('agent.cellBackground', { light: '#faf5f8', dark: Color.black, hc: Color.black }, nls.localize('agentCellBackground', "SQL Agent table cell background color."));
export const tableHoverBackground = registerColor('agent.tableHoverColor', { light: '#dcdcdc', dark: '#444444', hc: null }, nls.localize('agentTableHoverBackground', "SQL Agent table hover background color."));
export const jobsHeadingBackground = registerColor('agent.jobsHeadingColor', { light: '#f4f4f4', dark: '#444444', hc: '#2b56f2' }, nls.localize('agentJobsHeadingColor', "SQL Agent heading background color."));
export const cellBorderColor = registerColor('agent.cellBorderColor', { light: null, dark: null, hc: '#2b56f2' }, nls.localize('agentCellBorderColor', "SQL Agent table cell border color."));
export const tableBackground = registerColor('agent.tableBackground', { light: '#fffffe', dark: '#333333', hcDark: Color.black, hcLight: Color.black }, nls.localize('agentTableBackground', "SQL Agent Table background color."));
export const cellBackground = registerColor('agent.cellBackground', { light: '#faf5f8', dark: Color.black, hcDark: Color.black, hcLight: Color.black }, nls.localize('agentCellBackground', "SQL Agent table cell background color."));
export const tableHoverBackground = registerColor('agent.tableHoverColor', { light: '#dcdcdc', dark: '#444444', hcDark: null, hcLight: null }, nls.localize('agentTableHoverBackground', "SQL Agent table hover background color."));
export const jobsHeadingBackground = registerColor('agent.jobsHeadingColor', { light: '#f4f4f4', dark: '#444444', hcDark: '#2b56f2', hcLight: '#2b56f2' }, nls.localize('agentJobsHeadingColor', "SQL Agent heading background color."));
export const cellBorderColor = registerColor('agent.cellBorderColor', { light: null, dark: null, hcDark: '#2b56f2', hcLight: '#2b56f2' }, nls.localize('agentCellBorderColor', "SQL Agent table cell border color."));
export const resultsErrorColor = registerColor('results.error.color', { light: '#f44242', dark: '#f44242', hc: '#f44242' }, nls.localize('resultsErrorColor', "Results messages error color."));
export const resultsErrorColor = registerColor('results.error.color', { light: '#f44242', dark: '#f44242', hcDark: '#f44242', hcLight: '#f44242' }, nls.localize('resultsErrorColor', "Results messages error color."));
@@ -8,14 +8,12 @@ import { IAccountManagementService } from 'sql/platform/accounts/common/interfac
import { Disposable } from 'vs/base/common/lifecycle';
import {
ExtHostAccountManagementShape,
MainThreadAccountManagementShape,
SqlExtHostContext,
SqlMainContext
MainThreadAccountManagementShape
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { UpdateAccountListEventParams } from 'sql/platform/accounts/common/eventTypes';
import { values } from 'vs/base/common/collections';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadAccountManagement)
export class MainThreadAccountManagement extends Disposable implements MainThreadAccountManagementShape {
@@ -7,14 +7,12 @@ import type * as azurecore from 'azurecore';
import { Disposable } from 'vs/base/common/lifecycle';
import {
ExtHostAzureAccountShape,
MainThreadAzureAccountShape,
SqlExtHostContext,
SqlMainContext
MainThreadAzureAccountShape
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IAzureAccountService } from 'sql/platform/azureAccount/common/azureAccountService';
import { AzureAccountService } from 'sql/workbench/services/azureAccount/browser/azureAccountService';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadAzureAccount)
export class MainThreadAzureAccount extends Disposable implements MainThreadAzureAccountShape {
@@ -26,7 +24,7 @@ export class MainThreadAzureAccount extends Disposable implements MainThreadAzur
@IAzureAccountService azureAccountService: IAzureAccountService
) {
super();
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostAzureAccount);
this._proxy = <ExtHostAzureAccountShape><unknown>extHostContext.getProxy(SqlExtHostContext.ExtHostAzureAccount);
(azureAccountService as AzureAccountService).registerProxy(this);
}
@@ -7,14 +7,12 @@ import type * as mssql from 'mssql';
import { Disposable } from 'vs/base/common/lifecycle';
import {
ExtHostAzureBlobShape,
MainThreadAzureBlobShape,
SqlExtHostContext,
SqlMainContext
MainThreadAzureBlobShape
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IAzureBlobService } from 'sql/platform/azureBlob/common/azureBlobService';
import { AzureBlobService } from 'sql/workbench/services/azureBlob/browser/azureBlobService';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadAzureBlob)
export class MainThreadAzureBlob extends Disposable implements MainThreadAzureBlobShape {
@@ -4,15 +4,14 @@
*--------------------------------------------------------------------------------------------*/
import { ITaskService } from 'sql/workbench/services/tasks/common/tasksService';
import { MainThreadBackgroundTaskManagementShape, SqlMainContext, ExtHostBackgroundTaskManagementShape, SqlExtHostContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { MainThreadBackgroundTaskManagementShape, ExtHostBackgroundTaskManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { Disposable } from 'vs/base/common/lifecycle';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
import * as azdata from 'azdata';
export enum TaskStatus {
NotStarted = 0,
InProgress = 1,
@@ -3,10 +3,8 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SqlExtHostContext, SqlMainContext, ExtHostConnectionManagementShape, MainThreadConnectionManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostConnectionManagementShape, MainThreadConnectionManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import * as azdata from 'azdata';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IConnectionManagementService, ConnectionType, IConnectionParams } from 'sql/platform/connection/common/connectionManagement';
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/browser/objectExplorerService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -19,6 +17,8 @@ import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilit
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
import { IConnectionDialogService } from 'sql/workbench/services/connection/common/connectionDialogService';
import { deepClone } from 'vs/base/common/objects';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadConnectionManagement)
export class MainThreadConnectionManagement extends Disposable implements MainThreadConnectionManagementShape {
@@ -5,13 +5,13 @@
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
import {
SqlExtHostContext, ExtHostCredentialManagementShape,
MainThreadCredentialManagementShape, SqlMainContext
ExtHostCredentialManagementShape,
MainThreadCredentialManagementShape
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ICredentialsService } from 'sql/platform/credentials/common/credentialsService';
import * as azdata from 'azdata';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadCredentialManagement)
export class MainThreadCredentialManagement extends Disposable implements MainThreadCredentialManagementShape {
@@ -3,11 +3,11 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { SqlMainContext, MainThreadDashboardShape, ExtHostDashboardShape, SqlExtHostContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { MainThreadDashboardShape, ExtHostDashboardShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IDashboardService } from 'sql/platform/dashboard/browser/dashboardService';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadDashboard)
export class MainThreadDashboard implements MainThreadDashboardShape {
@@ -3,11 +3,11 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { MainThreadDashboardWebviewShape, SqlMainContext, ExtHostDashboardWebviewsShape, SqlExtHostContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { MainThreadDashboardWebviewShape, ExtHostDashboardWebviewsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IDashboardViewService, IDashboardWebview } from 'sql/platform/dashboard/browser/dashboardViewService';
import { Disposable } from 'vs/base/common/lifecycle';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadDashboardWebview)
export class MainThreadDashboardWebview extends Disposable implements MainThreadDashboardWebviewShape {
@@ -5,8 +5,8 @@
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
import {
SqlExtHostContext, ExtHostDataProtocolShape,
MainThreadDataProtocolShape, SqlMainContext
ExtHostDataProtocolShape,
MainThreadDataProtocolShape
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
@@ -23,8 +23,6 @@ import { ITaskService } from 'sql/workbench/services/tasks/common/tasksService';
import { IProfilerService } from 'sql/workbench/services/profiler/browser/interfaces';
import { ISerializationService } from 'sql/platform/serialization/common/serializationService';
import { IFileBrowserService } from 'sql/workbench/services/fileBrowser/common/interfaces';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { serializableToMap } from 'sql/base/common/map';
import { IAssessmentService } from 'sql/workbench/services/assessment/common/interfaces';
import { IDataGridProviderService } from 'sql/workbench/services/dataGridProvider/common/dataGridProviderService';
@@ -32,6 +30,9 @@ import { IAdsTelemetryService, ITelemetryEventProperties } from 'sql/platform/te
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
import { ITableDesignerService } from 'sql/workbench/services/tableDesigner/common/interface';
import { IExecutionPlanService } from 'sql/workbench/services/executionPlan/common/interfaces';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
/**
* Main thread class for handling data protocol management registration.
*/
@@ -3,9 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SqlMainContext, MainThreadExtensionManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { MainThreadExtensionManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { Disposable } from 'vs/base/common/lifecycle';
import { IExtensionManagementService, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
import { URI } from 'vs/base/common/uri';
@@ -13,6 +11,8 @@ import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configur
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
import { localize } from 'vs/nls';
import { ILogService } from 'vs/platform/log/common/log';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadExtensionManagement)
export class MainThreadExtensionManagement extends Disposable implements MainThreadExtensionManagementShape {
@@ -6,12 +6,12 @@
import 'vs/css!sql/media/icons/common-icons';
import { WebViewDialog } from 'sql/workbench/contrib/webview/browser/webViewDialog';
import { MainThreadModalDialogShape, SqlMainContext, SqlExtHostContext, ExtHostModalDialogsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { MainThreadModalDialogShape, ExtHostModalDialogsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { Disposable } from 'vs/base/common/lifecycle';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadModalDialog)
export class MainThreadModalDialog extends Disposable implements MainThreadModalDialogShape {
@@ -3,15 +3,13 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { MainThreadModelViewShape, SqlMainContext, ExtHostModelViewShape, SqlExtHostContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { MainThreadModelViewShape, ExtHostModelViewShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { Disposable } from 'vs/base/common/lifecycle';
import { IModelViewService } from 'sql/platform/modelComponents/browser/modelViewService';
import { IItemConfig, IComponentShape, IModelView } from 'sql/platform/model/browser/modelViewService';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadModelView)
export class MainThreadModelView extends Disposable implements MainThreadModelViewShape {
@@ -4,11 +4,9 @@
*--------------------------------------------------------------------------------------------*/
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { MainThreadModelViewDialogShape, SqlMainContext, ExtHostModelViewDialogShape, SqlExtHostContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { MainThreadModelViewDialogShape, ExtHostModelViewDialogShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { Dialog, DialogTab, DialogButton, WizardPage, Wizard } from 'sql/workbench/services/dialog/common/dialogTypes';
import { CustomDialogService, DefaultWizardOptions, DefaultDialogOptions } from 'sql/workbench/services/dialog/browser/customDialogService';
import { IModelViewDialogDetails, IModelViewTabDetails, IModelViewButtonDetails, IModelViewWizardPageDetails, IModelViewWizardDetails } from 'sql/workbench/api/common/sqlExtHostTypes';
@@ -21,6 +19,8 @@ import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { IEditorPane } from 'vs/workbench/common/editor';
import { Disposable } from 'vs/base/common/lifecycle';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadModelViewDialog)
export class MainThreadModelViewDialog extends Disposable implements MainThreadModelViewDialogShape {
@@ -4,10 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import { SqlExtHostContext, SqlMainContext, ExtHostNotebookShape, MainThreadNotebookShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { ExtHostNotebookShape, MainThreadNotebookShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { Disposable } from 'vs/base/common/lifecycle';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { Event, Emitter } from 'vs/base/common/event';
import { URI } from 'vs/base/common/uri';
@@ -19,6 +17,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import type { FutureInternal } from 'sql/workbench/services/notebook/browser/interfaces';
import { Registry } from 'vs/platform/registry/common/platform';
import { INotebookProviderRegistry, NotebookProviderRegistryId } from 'sql/workbench/services/notebook/common/notebookRegistry';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
const notebookRegistry = Registry.as<INotebookProviderRegistry>(NotebookProviderRegistryId);
@@ -4,17 +4,16 @@
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { URI, UriComponents } from 'vs/base/common/uri';
import { Event, Emitter } from 'vs/base/common/event';
import { IExtHostContext, IUndoStopOptions } from 'vs/workbench/api/common/extHost.protocol';
import { IUndoStopOptions } from 'vs/workbench/api/common/extHost.protocol';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { Schemas } from 'vs/base/common/network';
import * as types from 'vs/base/common/types';
import {
SqlMainContext, MainThreadNotebookDocumentsAndEditorsShape, SqlExtHostContext, ExtHostNotebookDocumentsAndEditorsShape,
MainThreadNotebookDocumentsAndEditorsShape, ExtHostNotebookDocumentsAndEditorsShape,
INotebookDocumentsAndEditorsDelta, INotebookEditorAddData, INotebookShowOptions, INotebookModelAddedData, INotebookModelChangedData
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { NotebookInput } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
@@ -27,6 +26,8 @@ import { localize } from 'vs/nls';
import { IFileService } from 'vs/platform/files/common/files';
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
import { NotebookEditor } from 'sql/workbench/contrib/notebook/browser/notebookEditor';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
class MainThreadNotebookEditor extends Disposable {
private _contentChangedEmitter = new Emitter<NotebookContentChange>();
@@ -3,13 +3,13 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SqlMainContext, MainThreadObjectExplorerShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { MainThreadObjectExplorerShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IObjectExplorerService, NodeInfoWithConnection } from 'sql/workbench/services/objectExplorer/browser/objectExplorerService';
import { Disposable } from 'vs/base/common/lifecycle';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadObjectExplorer)
export class MainThreadObjectExplorer extends Disposable implements MainThreadObjectExplorerShape {
@@ -3,9 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SqlExtHostContext, SqlMainContext, ExtHostQueryEditorShape, MainThreadQueryEditorShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { ExtHostQueryEditorShape, MainThreadQueryEditorShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IConnectionManagementService, IConnectionCompletionOptions, ConnectionType, RunQueryOnConnectionMode } from 'sql/platform/connection/common/connectionManagement';
import { QueryEditor } from 'sql/workbench/contrib/query/browser/queryEditor';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -19,6 +17,8 @@ import { ILogService } from 'vs/platform/log/common/log';
import { URI } from 'vs/base/common/uri';
import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/queryEditorService';
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadQueryEditor)
export class MainThreadQueryEditor extends Disposable implements MainThreadQueryEditorShape {
@@ -131,7 +131,8 @@ export class MainThreadQueryEditor extends Disposable implements MainThreadQuery
let editor = editors && editors.length > 0 ? editors[0] : undefined;
if (editor) {
let queryEditor = editor as QueryEditor;
// {{SQL CARBON TODO}} - cast incompatible type to unknown
let queryEditor = (<unknown>editor) as QueryEditor;
if (queryEditor) {
queryEditor.registerQueryModelViewTab(title, componentId);
}
@@ -8,13 +8,10 @@ import { IResourceProviderService } from 'sql/workbench/services/resourceProvide
import { Disposable } from 'vs/base/common/lifecycle';
import {
ExtHostResourceProviderShape,
MainThreadResourceProviderShape,
SqlExtHostContext,
SqlMainContext
MainThreadResourceProviderShape
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadResourceProvider)
export class MainThreadResourceProvider extends Disposable implements MainThreadResourceProviderShape {
@@ -3,13 +3,9 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import {
SqlExtHostContext,
SqlMainContext,
ExtHostTasksShape,
MainThreadTasksShape
} from 'sql/workbench/api/common/sqlExtHost.protocol';
@@ -18,6 +14,8 @@ import { IConnectionProfile } from 'azdata';
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
import { TaskRegistry } from 'sql/workbench/services/tasks/browser/tasksRegistry';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadTasks)
export class MainThreadTasks extends Disposable implements MainThreadTasksShape {
@@ -29,7 +27,7 @@ export class MainThreadTasks extends Disposable implements MainThreadTasksShape
extHostContext: IExtHostContext
) {
super();
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostTasks);
this._proxy = <ExtHostTasksShape><unknown>extHostContext.getProxy(SqlExtHostContext.ExtHostTasks);
}
override dispose() {
@@ -3,13 +3,13 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SqlMainContext, MainThreadWorkspaceShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { MainThreadWorkspaceShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { Disposable } from 'vs/base/common/lifecycle';
import { URI } from 'vs/base/common/uri';
import { IWorkspaceEditingService } from 'vs/workbench/services/workspaces/common/workspaceEditing';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(SqlMainContext.MainThreadWorkspace)
export class MainThreadWorkspace extends Disposable implements MainThreadWorkspaceShape {
@@ -7,13 +7,13 @@ import * as azdata from 'azdata';
import { Disposable } from 'vs/workbench/api/common/extHostTypes';
import {
ExtHostAccountManagementShape,
MainThreadAccountManagementShape,
SqlMainContext,
MainThreadAccountManagementShape
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { AzureResource } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Event, Emitter } from 'vs/base/common/event';
import { values } from 'vs/base/common/collections';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
type ProviderAndAccount = { provider: azdata.AccountProvider, account: azdata.Account };
@@ -4,11 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostBackgroundTaskManagementShape, SqlMainContext, MainThreadBackgroundTaskManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostBackgroundTaskManagementShape, MainThreadBackgroundTaskManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { Emitter } from 'vs/base/common/event';
import { generateUuid } from 'vs/base/common/uuid';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
export enum TaskStatus {
NotStarted = 0,
@@ -3,11 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ExtHostConnectionManagementShape, SqlMainContext, MainThreadConnectionManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostConnectionManagementShape, MainThreadConnectionManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import * as azdata from 'azdata';
import { IDisposable } from 'vs/base/common/lifecycle';
import { Disposable } from 'vs/workbench/api/common/extHostTypes';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
export class ExtHostConnectionManagement extends ExtHostConnectionManagementShape {
@@ -4,10 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { SqlMainContext, MainThreadCredentialManagementShape, ExtHostCredentialManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { MainThreadCredentialManagementShape, ExtHostCredentialManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { Disposable } from 'vs/workbench/api/common/extHostTypes';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
class CredentialAdapter {
public provider: azdata.CredentialProvider;
@@ -3,11 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SqlMainContext, ExtHostDashboardWebviewsShape, MainThreadDashboardWebviewShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostDashboardWebviewsShape, MainThreadDashboardWebviewShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Emitter } from 'vs/base/common/event';
import { deepClone } from 'vs/base/common/objects';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
@@ -8,13 +8,14 @@ import * as azdata from 'azdata';
import { Event, Emitter } from 'vs/base/common/event';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Disposable } from 'vs/workbench/api/common/extHostTypes';
import { SqlMainContext, MainThreadDataProtocolShape, ExtHostDataProtocolShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { MainThreadDataProtocolShape, ExtHostDataProtocolShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { DataProviderType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IURITransformer } from 'vs/base/common/uriIpc';
import { URI, UriComponents } from 'vs/base/common/uri';
import { RunOnceScheduler } from 'vs/base/common/async';
import { mapToSerializable } from 'sql/base/common/map';
import { ITelemetryEventProperties } from 'sql/platform/telemetry/common/telemetry';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
@@ -5,8 +5,8 @@
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostExtensionManagementShape, MainThreadExtensionManagementShape, SqlMainContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostExtensionManagementShape, MainThreadExtensionManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
export class ExtHostExtensionManagement implements ExtHostExtensionManagementShape {
@@ -3,11 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SqlMainContext, MainThreadModalDialogShape, ExtHostModalDialogsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { MainThreadModalDialogShape, ExtHostModalDialogsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { Emitter } from 'vs/base/common/event';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
class ExtHostDialog implements azdata.ModalDialog {
private _title: string;
@@ -14,11 +14,12 @@ import * as nls from 'vs/nls';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { SqlMainContext, ExtHostModelViewShape, MainThreadModelViewShape, ExtHostModelViewTreeViewsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostModelViewShape, MainThreadModelViewShape, ExtHostModelViewTreeViewsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IItemConfig, ModelComponentTypes, IComponentShape, IComponentEventArgs, ComponentEventType, ColumnSizingMode, ModelViewAction } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { ILogService } from 'vs/platform/log/common/log';
import { onUnexpectedError } from 'vs/base/common/errors';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
class ModelBuilderImpl implements azdata.ModelBuilder {
private nextComponentId: number;
@@ -11,9 +11,10 @@ import { generateUuid } from 'vs/base/common/uuid';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { SqlMainContext, ExtHostModelViewDialogShape, MainThreadModelViewDialogShape, ExtHostModelViewShape, ExtHostBackgroundTaskManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostModelViewDialogShape, MainThreadModelViewDialogShape, ExtHostModelViewShape, ExtHostBackgroundTaskManagementShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { TabOrientation, DialogWidth, DialogStyle, DialogPosition, IDialogProperties } from 'sql/workbench/api/common/sqlExtHostTypes';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
const DONE_LABEL = nls.localize('dialogDoneLabel', "Done");
const CANCEL_LABEL = nls.localize('dialogCancelLabel', "Cancel");
@@ -6,7 +6,7 @@
import { localize } from 'vs/nls';
import * as errors from 'vs/base/common/errors';
import * as vscode from 'vscode';
import { SqlMainContext, ExtHostModelViewTreeViewsShape, MainThreadModelViewShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostModelViewTreeViewsShape, MainThreadModelViewShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ITreeComponentItem } from 'sql/workbench/common/views';
import { CommandsConverter } from 'vs/workbench/api/common/extHostCommands';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
@@ -15,7 +15,8 @@ import * as vsTreeExt from 'vs/workbench/api/common/extHostTreeViews';
import { Emitter } from 'vs/base/common/event';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { ILogService } from 'vs/platform/log/common/log';
import { TreeDataTransferDTO } from 'vs/workbench/api/common/shared/treeDataTransfer';
import { DataTransferDTO } from 'vs/workbench/api/common/shared/dataTransfer';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
export class ExtHostModelViewTreeViews implements ExtHostModelViewTreeViewsShape {
private _proxy: MainThreadModelViewShape;
@@ -85,7 +86,11 @@ export class ExtHostModelViewTreeViews implements ExtHostModelViewTreeViewsShape
return Promise.resolve(undefined);
}
$onDrop(treeViewId: string, treeDataTransferDTO: TreeDataTransferDTO, newParentItemHandle: string): Promise<void> {
$handleDrop(destinationViewId: string, treeDataTransfer: DataTransferDTO, targetHandle: string | undefined, token: vscode.CancellationToken, operationUuid?: string, sourceViewId?: string, sourceTreeItemHandles?: string[]): Promise<void> {
return Promise.resolve(undefined);
}
$handleDrag(sourceViewId: string, sourceTreeItemHandles: string[], operationUuid: string, token: vscode.CancellationToken): Promise<DataTransferDTO | undefined> {
return Promise.resolve(undefined);
}
@@ -11,13 +11,14 @@ import { Disposable } from 'vs/workbench/api/common/extHostTypes';
import { localize } from 'vs/nls';
import { URI, UriComponents } from 'vs/base/common/uri';
import { ExtHostNotebookShape, MainThreadNotebookShape, SqlMainContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostNotebookShape, MainThreadNotebookShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IExecuteManagerDetails, INotebookSessionDetails, INotebookKernelDetails, INotebookFutureDetails, FutureMessageType, ISerializationManagerDetails } from 'sql/workbench/api/common/sqlExtHostTypes';
import { VSCodeSerializationProvider } from 'sql/workbench/api/common/notebooks/vscodeSerializationProvider';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { ADSNotebookController } from 'sql/workbench/api/common/notebooks/adsNotebookController';
import { VSCodeExecuteProvider } from 'sql/workbench/api/common/notebooks/vscodeExecuteProvider';
import { ExtHostNotebookDocumentsAndEditors } from 'sql/workbench/api/common/extHostNotebookDocumentsAndEditors';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
type Adapter = azdata.nb.NotebookSerializationProvider | azdata.nb.SerializationManager | azdata.nb.NotebookExecuteProvider | azdata.nb.ExecuteManager | azdata.nb.ISession | azdata.nb.IKernel | azdata.nb.IFuture;
@@ -273,7 +274,7 @@ export class ExtHostNotebook implements ExtHostNotebookShape {
rendererScripts?: vscode.NotebookRendererScript[]
): vscode.NotebookController {
let languagesHandler = (languages: string[]) => this._proxy.$updateKernelLanguages(viewType, viewType, languages);
let controller = new ADSNotebookController(extension, id, viewType, label, this._extHostNotebookDocumentsAndEditors, languagesHandler, getDocHandler, execHandler, extension.enableProposedApi ? rendererScripts : undefined);
let controller = new ADSNotebookController(extension, id, viewType, label, this._extHostNotebookDocumentsAndEditors, languagesHandler, getDocHandler, execHandler, extension.enabledApiProposals ? rendererScripts : undefined);
let newKernel: azdata.nb.IStandardKernel = {
name: viewType,
displayName: controller.label,
@@ -16,7 +16,7 @@ import { ok } from 'vs/base/common/assert';
import { localize } from 'vs/nls';
import {
SqlMainContext, INotebookDocumentsAndEditorsDelta, ExtHostNotebookDocumentsAndEditorsShape,
INotebookDocumentsAndEditorsDelta, ExtHostNotebookDocumentsAndEditorsShape,
MainThreadNotebookDocumentsAndEditorsShape, INotebookShowOptions, INotebookModelChangedData
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostNotebookDocumentData } from 'sql/workbench/api/common/extHostNotebookDocumentData';
@@ -24,6 +24,7 @@ import { ExtHostNotebookEditor } from 'sql/workbench/api/common/extHostNotebookE
import { VSCodeNotebookDocument } from 'sql/workbench/api/common/notebooks/vscodeNotebookDocument';
import { VSCodeNotebookEditor } from 'sql/workbench/api/common/notebooks/vscodeNotebookEditor';
import { docNotFoundForUriError } from 'sql/base/common/locConstants';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
type Adapter = azdata.nb.NavigationProvider;
@@ -56,10 +57,11 @@ export class ExtHostNotebookDocumentsAndEditors implements ExtHostNotebookDocume
private readonly _onDidOpenVSCodeNotebook = new Emitter<vscode.NotebookDocument>();
private readonly _onDidCloseVSCodeNotebook = new Emitter<vscode.NotebookDocument>();
private readonly _onDidSaveVSCodeNotebook = new Emitter<vscode.NotebookDocument>();
private readonly _onDidChangeVSCodeCellMetadata = new Emitter<vscode.NotebookCellMetadataChangeEvent>();
private readonly _onDidChangeVSCodeDocumentMetadata = new Emitter<vscode.NotebookDocumentMetadataChangeEvent>();
private readonly _onDidChangeVSCodeCellOutputs = new Emitter<vscode.NotebookCellOutputsChangeEvent>();
private readonly _onDidChangeVSCodeNotebookCells = new Emitter<vscode.NotebookCellsChangeEvent>();
// {{SQL CARBON TODO}} - disable events
// private readonly _onDidChangeVSCodeCellMetadata = new Emitter<vscode.NotebookCellMetadataChangeEvent>();
// private readonly _onDidChangeVSCodeDocumentMetadata = new Emitter<vscode.NotebookDocumentMetadataChangeEvent>();
// private readonly _onDidChangeVSCodeCellOutputs = new Emitter<vscode.NotebookCellOutputsChangeEvent>();
// private readonly _onDidChangeVSCodeNotebookCells = new Emitter<vscode.NotebookCellsChangeEvent>();
private readonly _onDidChangeVSCodeExecutionState = new Emitter<vscode.NotebookCellExecutionStateChangeEvent>();
private readonly _onDidChangeVSCodeEditorSelection = new Emitter<vscode.NotebookEditorSelectionChangeEvent>();
private readonly _onDidChangeVSCodeEditorRanges = new Emitter<vscode.NotebookEditorVisibleRangesChangeEvent>();
@@ -69,10 +71,10 @@ export class ExtHostNotebookDocumentsAndEditors implements ExtHostNotebookDocume
readonly onDidOpenVSCodeNotebookDocument: Event<vscode.NotebookDocument> = this._onDidOpenVSCodeNotebook.event;
readonly onDidCloseVSCodeNotebookDocument: Event<vscode.NotebookDocument> = this._onDidCloseVSCodeNotebook.event;
readonly onDidSaveVSCodeNotebookDocument: Event<vscode.NotebookDocument> = this._onDidSaveVSCodeNotebook.event;
readonly onDidChangeVSCodeCellMetadata: Event<vscode.NotebookCellMetadataChangeEvent> = this._onDidChangeVSCodeCellMetadata.event;
readonly onDidChangeVSCodeDocumentMetadata: Event<vscode.NotebookDocumentMetadataChangeEvent> = this._onDidChangeVSCodeDocumentMetadata.event;
readonly onDidChangeVSCodeCellOutputs: Event<vscode.NotebookCellOutputsChangeEvent> = this._onDidChangeVSCodeCellOutputs.event;
readonly onDidChangeVSCodeNotebookCells: Event<vscode.NotebookCellsChangeEvent> = this._onDidChangeVSCodeNotebookCells.event;
// readonly onDidChangeVSCodeCellMetadata: Event<vscode.NotebookCellMetadataChangeEvent> = this._onDidChangeVSCodeCellMetadata.event;
// readonly onDidChangeVSCodeDocumentMetadata: Event<vscode.NotebookDocumentMetadataChangeEvent> = this._onDidChangeVSCodeDocumentMetadata.event;
// readonly onDidChangeVSCodeCellOutputs: Event<vscode.NotebookCellOutputsChangeEvent> = this._onDidChangeVSCodeCellOutputs.event;
// readonly onDidChangeVSCodeNotebookCells: Event<vscode.NotebookCellsChangeEvent> = this._onDidChangeVSCodeNotebookCells.event;
readonly onDidChangeVSCodeExecutionState: Event<vscode.NotebookCellExecutionStateChangeEvent> = this._onDidChangeVSCodeExecutionState.event;
readonly onDidChangeVSCodeEditorSelection: Event<vscode.NotebookEditorSelectionChangeEvent> = this._onDidChangeVSCodeEditorSelection.event;
readonly onDidChangeVSCodeEditorRanges: Event<vscode.NotebookEditorVisibleRangesChangeEvent> = this._onDidChangeVSCodeEditorRanges.event;
@@ -3,8 +3,8 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostObjectExplorerShape, SqlMainContext, MainThreadObjectExplorerShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IMainContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostObjectExplorerShape, MainThreadObjectExplorerShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { ExtHostCommands } from 'vs/workbench/api/common/extHostCommands';
@@ -3,8 +3,8 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostQueryEditorShape, SqlMainContext, MainThreadQueryEditorShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { IMainContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostQueryEditorShape, MainThreadQueryEditorShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import * as azdata from 'azdata';
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
import { Disposable } from 'vs/workbench/api/common/extHostTypes';
@@ -44,7 +44,7 @@ export class ExtHostQueryEditor implements ExtHostQueryEditorShape {
constructor(
mainContext: IMainContext
) {
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadQueryEditor);
this._proxy = <MainThreadQueryEditorShape><unknown>mainContext.getProxy(SqlMainContext.MainThreadQueryEditor);
}
public $connect(fileUri: string, connectionId: string): Thenable<void> {
@@ -3,14 +3,14 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { TernarySearchTree } from 'vs/base/common/map';
import { URI } from 'vs/base/common/uri';
import { nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions';
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
import * as azdata from 'azdata';
import { IAzdataExtensionApiFactory } from 'sql/workbench/api/common/sqlExtHost.api.impl';
import { INodeModuleFactory } from 'vs/workbench/api/common/extHostRequireInterceptor';
import { ILogService } from 'vs/platform/log/common/log';
import { ExtensionPaths } from 'vs/workbench/api/common/extHostExtensionService';
export class AzdataNodeModuleFactory implements INodeModuleFactory {
public readonly nodeModuleName = 'azdata';
@@ -20,7 +20,7 @@ export class AzdataNodeModuleFactory implements INodeModuleFactory {
constructor(
private readonly _apiFactory: IAzdataExtensionApiFactory,
private readonly _extensionPaths: TernarySearchTree<URI, IExtensionDescription>,
private readonly _extensionPaths: ExtensionPaths, // TernarySearchTree<URI, IExtensionDescription>,
private readonly _logService: ILogService
) {
}
@@ -9,9 +9,9 @@ import { Disposable } from 'vs/workbench/api/common/extHostTypes';
import {
ExtHostResourceProviderShape,
MainThreadResourceProviderShape,
SqlMainContext,
} from 'sql/workbench/api/common/sqlExtHost.protocol';
import { values } from 'vs/base/common/collections';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
export class ExtHostResourceProvider extends ExtHostResourceProviderShape {
private _handlePool: number = 0;
+2 -1
View File
@@ -11,7 +11,8 @@ import * as extHostTypes from 'vs/workbench/api/common/extHostTypes';
import * as azdata from 'azdata';
import { ITaskHandlerDescription } from 'sql/workbench/services/tasks/common/tasks';
import { SqlMainContext, MainThreadTasksShape, ExtHostTasksShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { MainThreadTasksShape, ExtHostTasksShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
interface TaskHandler {
callback: Function;
@@ -5,10 +5,10 @@
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostWorkspaceShape, MainThreadWorkspaceShape, SqlMainContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostWorkspaceShape, MainThreadWorkspaceShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { URI } from 'vs/base/common/uri';
export class ExtHostWorkspace implements ExtHostWorkspaceShape {
private readonly _proxy: MainThreadWorkspaceShape;
@@ -12,7 +12,9 @@ export class VSCodeNotebookEditor implements vscode.NotebookEditor {
private readonly _document: vscode.NotebookDocument;
constructor(editor: azdata.nb.NotebookEditor) {
this._document = new VSCodeNotebookDocument(editor.document);
if (editor) {
this._document = new VSCodeNotebookDocument(editor.document);
}
}
public get document(): vscode.NotebookDocument {
@@ -5,7 +5,7 @@
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { SqlExtHostContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { SqlExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostAccountManagement } from 'sql/workbench/api/common/extHostAccountManagement';
import { ExtHostCredentialManagement } from 'sql/workbench/api/common/extHostCredentialManagement';
import { ExtHostDataProtocol } from 'sql/workbench/api/common/extHostDataProtocol';
@@ -3,12 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import {
createMainContextProxyIdentifier as createMainId,
createExtHostContextProxyIdentifier as createExtId
} from 'vs/workbench/services/extensions/common/proxyIdentifier';
import { URI, UriComponents } from 'vs/base/common/uri';
import { IDisposable } from 'vs/base/common/lifecycle';
import type * as azdata from 'azdata';
@@ -28,9 +23,9 @@ import {
import { IUndoStopOptions } from 'vs/workbench/api/common/extHost.protocol';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { EditorViewColumn } from 'vs/workbench/api/common/shared/editor';
import { TreeDataTransferDTO } from 'vs/workbench/api/common/shared/treeDataTransfer';
import { ITelemetryEventProperties } from 'sql/platform/telemetry/common/telemetry';
import { IQueryEvent } from 'sql/workbench/services/query/common/queryModel';
import { DataTransferDTO } from 'vs/workbench/api/common/shared/dataTransfer';
export abstract class ExtHostAzureBlobShape {
public $createSas(connectionUri: string, blobContainerUri: string, blobStorageKey: string, storageAccountName: string, expirationDate: string): Thenable<mssql.CreateSasResponse> { throw ni(); }
@@ -721,56 +716,6 @@ export interface MainThreadCredentialManagementShape extends IDisposable {
function ni() { return new Error('Not implemented'); }
// --- proxy identifiers
export const SqlMainContext = {
// SQL entries
MainThreadAccountManagement: createMainId<MainThreadAccountManagementShape>('MainThreadAccountManagement'),
MainThreadAzureAccount: createMainId<MainThreadAzureAccountShape>('MainThreadAzureAccount'),
MainThreadConnectionManagement: createMainId<MainThreadConnectionManagementShape>('MainThreadConnectionManagement'),
MainThreadCredentialManagement: createMainId<MainThreadCredentialManagementShape>('MainThreadCredentialManagement'),
MainThreadDataProtocol: createMainId<MainThreadDataProtocolShape>('MainThreadDataProtocol'),
MainThreadObjectExplorer: createMainId<MainThreadObjectExplorerShape>('MainThreadObjectExplorer'),
MainThreadBackgroundTaskManagement: createMainId<MainThreadBackgroundTaskManagementShape>('MainThreadBackgroundTaskManagement'),
MainThreadResourceProvider: createMainId<MainThreadResourceProviderShape>('MainThreadResourceProvider'),
MainThreadModalDialog: createMainId<MainThreadModalDialogShape>('MainThreadModalDialog'),
MainThreadTasks: createMainId<MainThreadTasksShape>('MainThreadTasks'),
MainThreadDashboardWebview: createMainId<MainThreadDashboardWebviewShape>('MainThreadDashboardWebview'),
MainThreadModelView: createMainId<MainThreadModelViewShape>('MainThreadModelView'),
MainThreadDashboard: createMainId<MainThreadDashboardShape>('MainThreadDashboard'),
MainThreadModelViewDialog: createMainId<MainThreadModelViewDialogShape>('MainThreadModelViewDialog'),
MainThreadQueryEditor: createMainId<MainThreadQueryEditorShape>('MainThreadQueryEditor'),
MainThreadNotebook: createMainId<MainThreadNotebookShape>('MainThreadNotebook'),
MainThreadNotebookDocumentsAndEditors: createMainId<MainThreadNotebookDocumentsAndEditorsShape>('MainThreadNotebookDocumentsAndEditors'),
MainThreadExtensionManagement: createMainId<MainThreadExtensionManagementShape>('MainThreadExtensionManagement'),
MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace'),
MainThreadAzureBlob: createMainId<MainThreadAzureBlobShape>('MainThreadAzureBlob'),
};
export const SqlExtHostContext = {
ExtHostAccountManagement: createExtId<ExtHostAccountManagementShape>('ExtHostAccountManagement'),
ExtHostAzureAccount: createExtId<ExtHostAzureAccountShape>('ExtHostAzureAccount'),
ExtHostConnectionManagement: createExtId<ExtHostConnectionManagementShape>('ExtHostConnectionManagement'),
ExtHostCredentialManagement: createExtId<ExtHostCredentialManagementShape>('ExtHostCredentialManagement'),
ExtHostDataProtocol: createExtId<ExtHostDataProtocolShape>('ExtHostDataProtocol'),
ExtHostObjectExplorer: createExtId<ExtHostObjectExplorerShape>('ExtHostObjectExplorer'),
ExtHostResourceProvider: createExtId<ExtHostResourceProviderShape>('ExtHostResourceProvider'),
ExtHostModalDialogs: createExtId<ExtHostModalDialogsShape>('ExtHostModalDialogs'),
ExtHostTasks: createExtId<ExtHostTasksShape>('ExtHostTasks'),
ExtHostBackgroundTaskManagement: createExtId<ExtHostBackgroundTaskManagementShape>('ExtHostBackgroundTaskManagement'),
ExtHostDashboardWebviews: createExtId<ExtHostDashboardWebviewsShape>('ExtHostDashboardWebviews'),
ExtHostModelView: createExtId<ExtHostModelViewShape>('ExtHostModelView'),
ExtHostModelViewTreeViews: createExtId<ExtHostModelViewTreeViewsShape>('ExtHostModelViewTreeViews'),
ExtHostDashboard: createExtId<ExtHostDashboardShape>('ExtHostDashboard'),
ExtHostModelViewDialog: createExtId<ExtHostModelViewDialogShape>('ExtHostModelViewDialog'),
ExtHostQueryEditor: createExtId<ExtHostQueryEditorShape>('ExtHostQueryEditor'),
ExtHostNotebook: createExtId<ExtHostNotebookShape>('ExtHostNotebook'),
ExtHostNotebookDocumentsAndEditors: createExtId<ExtHostNotebookDocumentsAndEditorsShape>('ExtHostNotebookDocumentsAndEditors'),
ExtHostExtensionManagement: createExtId<ExtHostExtensionManagementShape>('ExtHostExtensionManagement'),
ExtHostWorkspace: createExtId<ExtHostWorkspaceShape>('ExtHostWorkspace'),
ExtHostAzureBlob: createExtId<ExtHostAzureBlobShape>('ExtHostAzureBlob')
};
export interface MainThreadDashboardShape extends IDisposable {
}
@@ -827,7 +772,9 @@ export interface ExtHostModelViewShape {
export interface ExtHostModelViewTreeViewsShape {
$getChildren(treeViewId: string, treeItemHandle?: string): Promise<ITreeComponentItem[]>;
$onDrop(treeViewId: string, treeDataTransfer: TreeDataTransferDTO, newParentTreeItemHandle: string): Promise<void>;
$handleDrop(destinationViewId: string, treeDataTransfer: DataTransferDTO, targetHandle: string | undefined, token: vscode.CancellationToken, operationUuid?: string, sourceViewId?: string, sourceTreeItemHandles?: string[]): Promise<void>;
$handleDrag(sourceViewId: string, sourceTreeItemHandles: string[], operationUuid: string, token: vscode.CancellationToken): Promise<DataTransferDTO | undefined>;
$createTreeView(handle: number, componentId: string, options: { treeDataProvider: vscode.TreeDataProvider<any> }, extension: IExtensionDescription): azdata.TreeComponentView<any>;
$onNodeCheckedChanged(treeViewId: string, treeItemHandle?: string, checked?: boolean): void;
$onNodeSelected(treeViewId: string, nodes: string[]): void;
@@ -5,7 +5,8 @@
import { Action } from 'vs/base/common/actions';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { FocusedViewContext, IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
import { FocusedViewContext } from 'vs/workbench/common/contextkeys';
import { IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
// --- Toggle View with Command
@@ -8,7 +8,7 @@ import { CreateComponentsFunc, DesignerUIComponent, SetComponentValueFunc } from
import { DesignerViewModel, DesignerDataPropertyInfo, DesignerPropertyPath } from 'sql/workbench/browser/designer/interfaces';
import * as DOM from 'vs/base/browser/dom';
import { equals } from 'vs/base/common/objects';
import { MarkdownRenderer } from 'vs/editor/browser/core/markdownRenderer';
import { MarkdownRenderer } from 'vs/editor/contrib/markdownRenderer/browser/markdownRenderer';
import { localize } from 'vs/nls';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
@@ -8,7 +8,6 @@ import { Event, Emitter } from 'vs/base/common/event';
import { Schemas } from 'vs/base/common/network';
import { URI } from 'vs/base/common/uri';
import { ITextModel } from 'vs/editor/common/model';
import { IModelService } from 'vs/editor/common/services/modelService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
import { UntitledTextEditorModel } from 'vs/workbench/services/untitled/common/untitledTextEditorModel';
@@ -21,7 +20,6 @@ import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
import { IEditorOpenContext } from 'vs/workbench/common/editor';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { CancellationToken } from 'vs/base/common/cancellation';
@@ -30,6 +28,8 @@ import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget';
import { ITextEditorOptions } from 'vs/platform/editor/common/editor';
import { onUnexpectedError } from 'vs/base/common/errors';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { IModelService } from 'vs/editor/common/services/model';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration';
class DesignerCodeEditor extends CodeEditorWidget {
}
@@ -6,12 +6,12 @@
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { IDisposable } from 'vs/base/common/lifecycle';
import { URI } from 'vs/base/common/uri';
import { IModelService } from 'vs/editor/common/services/modelService';
import { IModeService } from 'vs/editor/common/services/modeService';
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
import { IModelService } from 'vs/editor/common/services/model';
import { ILanguageService } from 'vs/editor/common/languages/language';
export class DashboardInput extends EditorInput {
@@ -35,7 +35,7 @@ export class DashboardInput extends EditorInput {
constructor(
_connectionProfile: IConnectionProfile,
@IConnectionManagementService private _connectionService: IConnectionManagementService,
@IModeService modeService: IModeService,
@ILanguageService modeService: ILanguageService,
@IModelService model: IModelService
) {
super();
@@ -47,7 +47,7 @@ export class DashboardInput extends EditorInput {
// vscode has a comment that Mode's will eventually be removed (not sure the state of this comment)
// so this might be able to be undone when that happens
if (!model.getModel(this.resource)) {
model.createModel('', modeService.create('dashboard'), this.resource);
model.createModel('', modeService.createById('dashboard'), this.resource);
}
this._initializedPromise = _connectionService.connectIfNotConnected(_connectionProfile, 'dashboard').then(
u => {
@@ -10,9 +10,9 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ILogService } from 'vs/platform/log/common/log';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
export abstract class CalloutDialog<T> extends Modal {
+1 -1
View File
@@ -21,7 +21,6 @@ import { IThemable } from 'vs/base/common/styler';
import { isUndefinedOrNull } from 'vs/base/common/types';
import { URI } from 'vs/base/common/uri';
import { generateUuid } from 'vs/base/common/uuid';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { localize } from 'vs/nls';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
@@ -30,6 +29,7 @@ import { ILogService } from 'vs/platform/log/common/log';
import { attachButtonStyler } from 'vs/platform/theme/common/styler';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { Emitter } from 'vs/base/common/event';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
export enum MessageLevel {
Error = 0,
@@ -24,12 +24,12 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
import { append, $, clearNode } from 'vs/base/browser/dom';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import { ILogService } from 'vs/platform/log/common/log';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
import { ServiceOptionType } from 'sql/platform/connection/common/interfaces';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { GroupHeaderBackground } from 'sql/platform/theme/common/colorRegistry';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
export interface IOptionsDialogOptions extends IModalOptions {
cancelLabel?: string;
@@ -12,8 +12,6 @@ import * as DOM from 'vs/base/browser/dom';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { TextResourceEditorInput } from 'vs/workbench/common/editor/textResourceEditorInput';
import { URI } from 'vs/base/common/uri';
import { IModeService } from 'vs/editor/common/services/modeService';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { TextDiffEditor } from 'vs/workbench/browser/parts/editor/textDiffEditor';
@@ -30,6 +28,8 @@ import { convertSizeToNumber } from 'sql/base/browser/dom';
import { onUnexpectedError } from 'vs/base/common/errors';
import { ILogService } from 'vs/platform/log/common/log';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IModelService } from 'vs/editor/common/services/model';
import { ILanguageService } from 'vs/editor/common/languages/language';
@Component({
template: `
@@ -58,7 +58,7 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
@Inject(IModelService) private _modelService: IModelService,
@Inject(IModeService) private _modeService: IModeService,
@Inject(ILanguageService) private _modeService: ILanguageService,
@Inject(ITextModelService) private _textModelService: ITextModelService,
@Inject(ILogService) logService: ILogService,
@Inject(IEditorService) private _editorService: IEditorService,
@@ -89,7 +89,7 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
let textModelContentProvider = this._textModelService.registerTextModelContentProvider('sqlDiffEditor', {
provideTextContent: (resource: URI): Promise<ITextModel> => {
let modelContent = '';
let languageSelection = this._modeService.create('plaintext');
let languageSelection = this._modeService.createById('plaintext');
return Promise.resolve(this._modelService.createModel(modelContent, languageSelection, resource));
}
});
@@ -153,7 +153,7 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
private updateLanguageMode() {
if (this._editorModel && this._editor) {
this._languageMode = this.languageMode;
let languageSelection = this._modeService.create(this._languageMode);
let languageSelection = this._modeService.createById(this._languageMode);
this._modelService.setMode(this._editorModel.originalModel.textEditorModel, languageSelection);
this._modelService.setMode(this._editorModel.modifiedModel.textEditorModel, languageSelection);
}
@@ -13,8 +13,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { ITextModel } from 'vs/editor/common/model';
import { URI } from 'vs/base/common/uri';
import { Schemas } from 'vs/base/common/network';
import { IModeService } from 'vs/editor/common/services/modeService';
import { IModelService } from 'vs/editor/common/services/modelService';
import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { QueryTextEditor } from 'sql/workbench/browser/modelComponents/queryTextEditor';
@@ -26,6 +24,8 @@ import { SimpleProgressIndicator } from 'sql/workbench/services/progress/browser
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { convertSizeToNumber } from 'sql/base/browser/dom';
import { IModelService } from 'vs/editor/common/services/model';
import { ILanguageService } from 'vs/editor/common/languages/language';
@Component({
template: '',
@@ -48,7 +48,7 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
@Inject(IModelService) private _modelService: IModelService,
@Inject(IModeService) private _modeService: IModeService,
@Inject(ILanguageService) private _modeService: ILanguageService,
@Inject(ILogService) private _logService: ILogService,
@Inject(IEditorService) private readonly editorService: IEditorService,
@Inject(ILogService) logService: ILogService
@@ -71,7 +71,7 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
this._editor.setVisible(true);
let uri = this.createUri();
this._editorInput = await this.editorService.createEditorInput({ forceUntitled: true, resource: uri, mode: 'plaintext' }) as UntitledTextEditorInput;
this._editorInput = await this.editorService.createEditorInput({ forceUntitled: true, resource: uri, languageId: 'plaintext' }) as UntitledTextEditorInput;
await this._editor.setInput(this._editorInput, undefined, undefined);
const model = await this._editorInput.resolve();
@@ -141,7 +141,7 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
private updateLanguageMode() {
if (this._editorModel && this._editor) {
this._languageMode = this.languageMode;
let languageSelection = this._modeService.create(this._languageMode);
let languageSelection = this._modeService.createById(this._languageMode);
this._modelService.setMode(this._editorModel, languageSelection);
}
}
@@ -14,7 +14,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
import { IEditorOpenContext } from 'vs/workbench/common/editor';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -24,6 +23,7 @@ import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/u
import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget';
import { ITextEditorOptions } from 'vs/platform/editor/common/editor';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration';
/**
* Extension of TextResourceEditor that is always readonly rather than only with non UntitledInputs
@@ -4,15 +4,16 @@
*--------------------------------------------------------------------------------------------*/
// eslint-disable-next-line code-import-patterns
import { ExtHostModelViewTreeViewsShape, SqlExtHostContext } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { ExtHostModelViewTreeViewsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
// eslint-disable-next-line code-import-patterns
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IModelViewTreeViewDataProvider, ITreeComponentItem } from 'sql/workbench/common/views';
import { INotificationService } from 'vs/platform/notification/common/notification';
// eslint-disable-next-line code-import-patterns
import * as vsTreeView from 'vs/workbench/api/browser/mainThreadTreeViews';
import { ResolvableTreeItem } from 'vs/workbench/common/views';
import { deepClone } from 'vs/base/common/objects';
import { IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
export class ResolvableTreeComponentItem extends ResolvableTreeItem implements ITreeComponentItem {
@@ -11,15 +11,15 @@ import { localize } from 'vs/nls';
import { Registry } from 'vs/platform/registry/common/platform';
import { ILanguageAssociationRegistry, Extensions as LanguageAssociationExtensions } from 'sql/workbench/services/languageAssociation/common/languageAssociation';
import { IModeSupport } from 'vs/workbench/services/textfile/common/textfiles';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { ILanguageSupport } from 'vs/workbench/services/textfile/common/textfiles';
const languageAssociationRegistry = Registry.as<ILanguageAssociationRegistry>(LanguageAssociationExtensions.LanguageAssociations);
/**
* Handles setting a mode from the editor status and converts inputs if necessary
*/
export async function setMode(accessor: ServicesAccessor, modeSupport: IModeSupport, activeEditor: EditorInput, language: string): Promise<void> {
export async function setLanguageId(accessor: ServicesAccessor, modeSupport: ILanguageSupport, activeEditor: EditorInput, language: string): Promise<void> {
const editorService = accessor.get(IEditorService);
const activeWidget = getCodeEditor(editorService.activeTextEditorControl);
const activeControl = editorService.activeEditorPane;
@@ -33,7 +33,7 @@ export async function setMode(accessor: ServicesAccessor, modeSupport: IModeSupp
notificationService.error(localize('languageChangeUnsupported', "Changing editor types on unsaved files is unsupported"));
return;
}
modeSupport.setMode(language);
modeSupport.setLanguageId(language);
let input: EditorInput;
if (oldInputCreator) { // only transform the input if we have someone who knows how to deal with it (e.x QueryInput -> UntitledInput, etc)
input = oldInputCreator.createBase(activeEditor);
@@ -7,7 +7,7 @@ import { localize } from 'vs/nls';
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
import { Emitter } from 'vs/base/common/event';
import { URI } from 'vs/base/common/uri';
import { GroupIdentifier, IRevertOptions, ISaveOptions, EditorInputCapabilities } from 'vs/workbench/common/editor';
import { GroupIdentifier, IRevertOptions, ISaveOptions, EditorInputCapabilities, IUntypedEditorInput } from 'vs/workbench/common/editor';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IConnectionManagementService, IConnectableInput, INewConnectionParams, RunQueryOnConnectionMode } from 'sql/platform/connection/common/connectionManagement';
@@ -257,7 +257,7 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
}
}
override save(group: GroupIdentifier, options?: ISaveOptions): Promise<EditorInput | undefined> {
override save(group: GroupIdentifier, options?: ISaveOptions): Promise<IUntypedEditorInput | undefined> {
return this.text.save(group, options);
}
+14 -7
View File
@@ -11,41 +11,48 @@ import { TAB_ACTIVE_BACKGROUND } from 'vs/workbench/common/theme';
export const VERTICAL_TAB_ACTIVE_BACKGROUND = registerColor('tab.verticalTabActiveBackground', {
dark: '#444444',
light: '#e1f0fe',
hc: TAB_ACTIVE_BACKGROUND
hcDark: TAB_ACTIVE_BACKGROUND,
hcLight: TAB_ACTIVE_BACKGROUND
}, localize('verticalTabActiveBackground', "Active tab background color for vertical tabs"));
export const DASHBOARD_BORDER = registerColor('dashboard.border', {
dark: '#8A8886',
light: '#DDDDDD',
hc: contrastBorder
hcDark: contrastBorder,
hcLight: contrastBorder
}, localize('dashboardBorder', "Color for borders in dashboard"));
export const DASHBOARD_WIDGET_TITLE = registerColor('dashboardWidget.title', {
light: '#323130',
dark: '#FFFFFF',
hc: '#FFFFFF'
hcDark: '#FFFFFF',
hcLight: '#000000'
}, localize('dashboardWidget', 'Color of dashboard widget title'));
export const DASHBOARD_WIDGET_SUBTEXT = registerColor('dashboardWidget.subText', {
light: '#484644',
dark: '#8A8886',
hc: '#FFFFFF'
hcDark: '#FFFFFF',
hcLight: '#000000'
}, localize('dashboardWidgetSubtext', "Color for dashboard widget subtext"));
export const PROPERTIES_CONTAINER_PROPERTY_VALUE = registerColor('propertiesContainer.propertyValue', {
light: '#000000',
dark: 'FFFFFF',
hc: 'FFFFFF'
hcDark: 'FFFFFF',
hcLight: '000000'
}, localize('propertiesContainerPropertyValue', "Color for property values displayed in the properties container component"));
export const PROPERTIES_CONTAINER_PROPERTY_NAME = registerColor('propertiesContainer.propertyName', {
light: '#161616',
dark: '#8A8886',
hc: '#FFFFFF'
hcDark: '#FFFFFF',
hcLight: '#000000'
}, localize('propertiesContainerPropertyName', "Color for property names displayed in the properties container component"));
export const TOOLBAR_OVERFLOW_SHADOW = registerColor('toolbar.overflowShadow', {
light: new Color(new RGBA(0, 0, 0, .132)),
dark: new Color(new RGBA(0, 0, 0, 0.25)),
hc: null
hcDark: null,
hcLight: null
}, localize('toolbarOverflowShadow', "Toolbar overflow shadow color"));
@@ -250,7 +250,8 @@ suite('Assessment Actions', () => {
name: '',
resource: fileUri,
size: 42,
readonly: false
readonly: false,
children: []
});
});
@@ -16,7 +16,7 @@ import { bootstrapAngular } from 'sql/workbench/services/bootstrap/browser/boots
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { append, $ } from 'vs/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
@@ -75,7 +75,7 @@ export class CreateInsightAction extends Action {
}
};
let input = this.untitledEditorService.create({ mode: 'json', initialValue: JSON.stringify(widgetConfig) });
let input = this.untitledEditorService.create({ languageId: 'json', initialValue: JSON.stringify(widgetConfig) });
try {
await this.editorService.openEditor(this.instantiationService.createInstance(UntitledTextEditorInput, input), { pinned: true });
} catch (error) {
@@ -12,7 +12,7 @@ import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { ILogService } from 'vs/platform/log/common/log';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
import { attachButtonStyler } from 'vs/platform/theme/common/styler';
@@ -8,7 +8,7 @@ import * as chartjs from 'chart.js';
import { mixin } from 'sql/base/common/objects';
import { localize } from 'vs/nls';
import * as colors from 'vs/platform/theme/common/colorRegistry';
import { editorLineNumbers } from 'vs/editor/common/view/editorColorRegistry';
import { editorLineNumbers } from 'vs/editor/common/core/editorColorRegistry';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import { IInsight, IPointDataSet, customMixin } from './interfaces';
@@ -17,7 +17,7 @@ import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard
import { AngularDisposable } from 'sql/base/browser/lifecycle';
import * as azdata from 'azdata';
import { WebviewElement, IWebviewService } from 'vs/workbench/contrib/webview/browser/webview';
import { IWebviewElement, IWebviewService } from 'vs/workbench/contrib/webview/browser/webview';
@Component({
template: '',
@@ -32,7 +32,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
public readonly onMessage: Event<string> = this._onMessage.event;
private _onMessageDisposable: IDisposable;
private _webview: WebviewElement;
private _webview: IWebviewElement;
private _html: string;
constructor(
@@ -6,7 +6,7 @@
import { ManageAction, ManageActionContext } from 'sql/workbench/browser/actions';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { IAngularEventingService } from 'sql/platform/angularEventing/browser/angularEventingService';
import { ExecuteCommandAction } from 'vs/platform/actions/common/actions';
import { ExecuteCommandAction } from 'vs/workbench/browser/parts/editor/editorActions';
export class ExplorerManageAction extends ManageAction {
public static override readonly ID = 'explorerwidget.manage';
@@ -24,7 +24,9 @@ export class ExplorerManageAction extends ManageAction {
}
export class CustomExecuteCommandAction extends ExecuteCommandAction {
override run(context: ManageActionContext): Promise<any> {
return super.run(context.profile);
override run(): Promise<any> {
// {{SQL CARBON TODO}}
//return super.run(context.profile);
return super.run();
}
}
@@ -9,7 +9,7 @@ import { RunQueryOnConnectionMode } from 'sql/platform/connection/common/connect
import { InsightActionContext } from 'sql/workbench/browser/actions';
import { openNewQuery } from 'sql/workbench/contrib/query/browser/queryActions';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
import { isString } from 'vs/base/common/types';
export class RunInsightQueryAction extends Action {
@@ -30,7 +30,7 @@ import { IntervalTimer, createCancelablePromise } from 'vs/base/common/async';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { toDisposable } from 'vs/base/common/lifecycle';
import { isPromiseCanceledError } from 'vs/base/common/errors';
import { isCancellationError } from 'vs/base/common/errors';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IFileService } from 'vs/platform/files/common/files';
import { URI } from 'vs/base/common/uri';
@@ -101,7 +101,7 @@ export class InsightsWidget extends DashboardWidget implements IDashboardWidget,
}
},
error => {
if (isPromiseCanceledError(error)) {
if (isCancellationError(error)) {
return;
}
if (this._inited) {
@@ -8,7 +8,7 @@ import { mixin } from 'sql/base/common/objects';
import { IChartConfig } from 'sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/interfaces';
import * as colors from 'vs/platform/theme/common/colorRegistry';
import { editorLineNumbers } from 'vs/editor/common/view/editorColorRegistry';
import { editorLineNumbers } from 'vs/editor/common/core/editorColorRegistry';
import { ChangeDetectorRef, Inject, forwardRef } from '@angular/core';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
@@ -15,7 +15,7 @@ import { CommonServiceInterface } from 'sql/workbench/services/bootstrap/browser
import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard/browser/dashboardViewService';
import * as azdata from 'azdata';
import { WebviewElement, IWebviewService } from 'vs/workbench/contrib/webview/browser/webview';
import { IWebviewElement, IWebviewService } from 'vs/workbench/contrib/webview/browser/webview';
interface IWebviewWidgetConfig {
id: string;
@@ -30,7 +30,7 @@ const selector = 'webview-widget';
export class WebviewWidget extends DashboardWidget implements IDashboardWidget, OnInit, IDashboardWebview {
private _id: string;
private _webview: WebviewElement;
private _webview: IWebviewElement;
private _html: string;
private _onMessage = new Emitter<string>();
public readonly onMessage: Event<string> = this._onMessage.event;
@@ -109,7 +109,7 @@ export class DataExplorerContainerExtensionHandler implements IWorkbenchContribu
when: ContextKeyExpr.deserialize(item.when),
canToggleVisibility: true,
canMoveView: true,
treeView: container.id === VIEWLET_ID ? this.instantiationService.createInstance(CustomTreeView, item.id, item.name) : this.instantiationService.createInstance(VSCustomTreeView, item.id, item.name),
treeView: container.id === VIEWLET_ID ? this.instantiationService.createInstance(CustomTreeView, item.id, item.name) : this.instantiationService.createInstance(VSCustomTreeView, item.id, item.name, VIEWLET_ID),
collapsed: this.showCollapsed(container),
extensionId: extension.description.identifier,
originalContainerId: entry.key
@@ -89,7 +89,7 @@ export class DataExplorerViewPaneContainer extends ViewPaneContainer {
}
protected override createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane {
let viewletPanel = this.instantiationService.createInstance(viewDescriptor.ctorDescriptor.ctor, options) as ViewPane;
let viewletPanel = (<any>this.instantiationService).createInstance(viewDescriptor.ctorDescriptor.ctor, options) as ViewPane;
this._register(viewletPanel);
return viewletPanel;
}
@@ -7,7 +7,6 @@ import * as DOM from 'vs/base/browser/dom';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IEditorOpenContext } from 'vs/workbench/common/editor';
import { getZoomLevel } from 'vs/base/browser/browser';
import { Configuration } from 'vs/editor/browser/config/configuration';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
@@ -16,11 +15,12 @@ import * as types from 'vs/base/common/types';
import { IQueryModelService } from 'sql/workbench/services/query/common/queryModel';
import { BareResultsGridInfo, getBareResultsGridInfoStyles } from 'sql/workbench/contrib/query/browser/queryResultsEditor';
import { EditDataGridPanel } from 'sql/workbench/contrib/editData/browser/editDataGridPanel';
import { EditDataResultsInput } from 'sql/workbench/browser/editData/editDataResultsInput';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { IEditorOptions } from 'vs/platform/editor/common/editor';
import { applyFontInfo } from 'vs/editor/browser/config/domFontInfo';
import { EditDataGridPanel } from 'sql/workbench/contrib/editData/browser/editDataGridPanel';
export class EditDataResultsEditor extends EditorPane {
@@ -75,7 +75,7 @@ export class EditDataResultsEditor extends EditorPane {
private _applySettings() {
if (this.input && this.input.container) {
Configuration.applyFontInfoSlow(this.getContainer(), this._rawOptions);
applyFontInfo(this.getContainer(), this._rawOptions);
if (!this.input.css) {
this.input.css = DOM.createStyleSheet(this.input.container);
}
@@ -6,7 +6,7 @@
import * as azdataGraphModule from 'azdataGraph';
import * as azdata from 'azdata';
import * as sqlExtHostType from 'sql/workbench/api/common/sqlExtHostTypes';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
import { isString } from 'vs/base/common/types';
import { badgeIconPaths, collapseExpandNodeIconPaths, executionPlanNodeIconPaths } from 'sql/workbench/contrib/executionPlan/browser/constants';
import { localize } from 'vs/nls';
@@ -9,7 +9,7 @@ import { ActionBar } from 'sql/base/browser/ui/taskbar/actionbar';
import { ExecutionPlanPropertiesView } from 'sql/workbench/contrib/executionPlan/browser/executionPlanPropertiesView';
import { ExecutionPlanWidgetController } from 'sql/workbench/contrib/executionPlan/browser/executionPlanWidgetController';
import { ExecutionPlanViewHeader } from 'sql/workbench/contrib/executionPlan/browser/executionPlanViewHeader';
import { ISashEvent, ISashLayoutProvider, Orientation, Sash } from 'vs/base/browser/ui/sash/sash';
import { IHorizontalSashLayoutProvider, ISashEvent, Orientation, Sash } from 'vs/base/browser/ui/sash/sash';
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IFileService } from 'vs/platform/files/common/files';
@@ -21,7 +21,6 @@ import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions';
import { ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar';
import { openNewQuery } from 'sql/workbench/contrib/query/browser/queryActions';
import { RunQueryOnConnectionMode } from 'sql/platform/connection/common/connectionManagement';
import { formatDocumentWithSelectedProvider, FormattingMode } from 'vs/editor/contrib/format/format';
import { Progress } from 'vs/platform/progress/common/progress';
import { CancellationToken } from 'vs/base/common/cancellation';
import { Action, Separator } from 'vs/base/common/actions';
@@ -37,10 +36,11 @@ import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
import { ExecutionPlanComparisonInput } from 'sql/workbench/contrib/executionPlan/browser/compareExecutionPlanInput';
import { ExecutionPlanFileView } from 'sql/workbench/contrib/executionPlan/browser/executionPlanFileView';
import { QueryResultsView } from 'sql/workbench/contrib/query/browser/queryResultsView';
import { formatDocumentWithSelectedProvider, FormattingMode } from 'vs/editor/contrib/format/browser/format';
import { HighlightExpensiveOperationWidget } from 'sql/workbench/contrib/executionPlan/browser/widgets/highlightExpensiveNodeWidget';
import { Disposable } from 'vs/base/common/lifecycle';
export class ExecutionPlanView extends Disposable implements ISashLayoutProvider {
export class ExecutionPlanView extends Disposable implements IHorizontalSashLayoutProvider {
// Underlying execution plan displayed in the view
private _model?: azdata.executionPlan.ExecutionPlanGraph;
@@ -298,7 +298,7 @@ export class ExecutionPlanView extends Disposable implements ISashLayoutProvider
}
public async openGraphFile() {
const input = this._untitledEditorService.create({ mode: this.model.graphFile.graphFileType, initialValue: this.model.graphFile.graphFileContent });
const input = this._untitledEditorService.create({ languageId: this.model.graphFile.graphFileType, initialValue: this.model.graphFile.graphFileContent });
await input.resolve();
await this._instantiationService.invokeFunction(formatDocumentWithSelectedProvider, input.textEditorModel, FormattingMode.Explicit, Progress.None, CancellationToken.None);
input.setDirty(false);
@@ -7,10 +7,11 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation
import { Registry } from 'vs/platform/registry/common/platform';
import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions';
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { ExtensionsLabel, IExtensionGalleryService, IGalleryExtension, TargetPlatform } from 'vs/platform/extensionManagement/common/extensionManagement';
import { ExtensionsLabel, IExtensionGalleryService, IGalleryExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
import { OpenExtensionAuthoringDocsAction } from 'sql/workbench/contrib/extensions/browser/extensionsActions';
import { localize } from 'vs/nls';
import { deepClone } from 'vs/base/common/objects';
import { CancellationToken } from 'vs/base/common/cancellation';
// Global Actions
const actionRegistry = Registry.as<IWorkbenchActionRegistry>(WorkbenchActionExtensions.WorkbenchActions);
@@ -41,7 +42,7 @@ CommandsRegistry.registerCommand({
},
handler: async (accessor, arg: string): Promise<IGalleryExtension> => {
const extensionGalleryService = accessor.get(IExtensionGalleryService);
const extension = await extensionGalleryService.getCompatibleExtension({ id: arg }, TargetPlatform.UNIVERSAL);
const [extension] = await extensionGalleryService.getExtensions([{ id: arg }], { source: 'getExtensionFromGallery' }, CancellationToken.None);
if (extension) {
return deepClone(extension);
} else {
@@ -14,7 +14,7 @@ import { URI, UriComponents } from 'vs/base/common/uri';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { WebviewContentOptions, IWebviewService, WebviewElement } from 'vs/workbench/contrib/webview/browser/webview';
import { WebviewContentOptions, IWebviewService, IWebviewElement } from 'vs/workbench/contrib/webview/browser/webview';
import { generateUuid } from 'vs/base/common/uuid';
import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBase';
@@ -43,7 +43,7 @@ export default class WebViewComponent extends ComponentBase<WebViewProperties> i
private static readonly standardSupportedLinkSchemes = ['http', 'https', 'mailto'];
private _webview: WebviewElement;
private _webview: IWebviewElement;
private _renderedHtml: string;
private _extensionLocationUri: URI;
private _ready: Promise<void>;
@@ -17,7 +17,6 @@ import { IPathService } from 'vs/workbench/services/path/common/pathService';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ILogService } from 'vs/platform/log/common/log';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { Deferred } from 'sql/base/common/promise';
@@ -27,6 +26,7 @@ import { RadioButton } from 'sql/base/browser/ui/radioButton/radioButton';
import { attachCalloutDialogStyler } from 'sql/workbench/common/styler';
import * as path from 'vs/base/common/path';
import { unquoteText } from 'sql/workbench/contrib/notebook/browser/calloutDialog/common/utils';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
export interface IImageCalloutDialogOptions {
insertTitle?: string,
@@ -195,7 +195,7 @@ export class ImageCalloutDialog extends Modal {
private registerListeners(): void {
this._register(styler.attachInputBoxStyler(this._imageUrlInputBox, this._themeService));
this._register(styler.attachCheckboxStyler(this._imageEmbedCheckbox, this._themeService));
this._register(styler.attachToggleStyler(this._imageEmbedCheckbox, this._themeService));
}
public insert(): void {
@@ -14,7 +14,6 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ILogService } from 'vs/platform/log/common/log';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { Deferred } from 'sql/base/common/promise';
@@ -22,6 +21,7 @@ import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
import { attachCalloutDialogStyler } from 'sql/workbench/common/styler';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { escapeLabel, escapeUrl, unquoteText } from 'sql/workbench/contrib/notebook/browser/calloutDialog/common/utils';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
export interface ILinkCalloutDialogOptions {
insertTitle?: string,
@@ -17,8 +17,6 @@ import * as themeColors from 'vs/workbench/common/theme';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ITextModel } from 'vs/editor/common/model';
import * as DOM from 'vs/base/browser/dom';
import { IModeService } from 'vs/editor/common/services/modeService';
import { IModelService } from 'vs/editor/common/services/modelService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { Event, Emitter } from 'vs/base/common/event';
import { CellTypes } from 'sql/workbench/services/notebook/common/contracts';
@@ -41,6 +39,8 @@ import { onUnexpectedError } from 'vs/base/common/errors';
import { getIconClasses } from 'vs/editor/common/services/getIconClasses';
import { URI } from 'vs/base/common/uri';
import { ILanguagePickInput } from 'vs/workbench/contrib/notebook/browser/controller/editActions';
import { ILanguageService } from 'vs/editor/common/languages/language';
import { IModelService } from 'vs/editor/common/services/model';
export const CODE_SELECTOR: string = 'code-component';
const MARKDOWN_CLASS = 'markdown';
@@ -104,7 +104,7 @@ export class CodeComponent extends CellView implements OnInit, OnChanges {
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
@Inject(IModelService) private _modelService: IModelService,
@Inject(IModeService) private _modeService: IModeService,
@Inject(ILanguageService) private _modeService: ILanguageService,
@Inject(IConfigurationService) private _configurationService: IConfigurationService,
@Inject(forwardRef(() => ChangeDetectorRef)) private _changeRef: ChangeDetectorRef,
@Inject(ILogService) private readonly logService: ILogService,
@@ -407,7 +407,7 @@ export class CodeComponent extends CellView implements OnInit, OnChanges {
private updateLanguageMode(): void {
if (this._editorModel && this._editor) {
let modeValue = this._modeService.create(this.cellModel.language);
let modeValue = this._modeService.createById(this.cellModel.language);
this._modelService.setMode(this._editorModel, modeValue);
}
}
@@ -519,7 +519,7 @@ export class CodeComponent extends CellView implements OnInit, OnChanges {
/**
* Copied from coreActions.ts
*/
private getFakeResource(lang: string, modeService: IModeService): URI | undefined {
private getFakeResource(lang: string, modeService: ILanguageService): URI | undefined {
let fakeResource: URI | undefined;
const extensions = modeService.getExtensions(lang);
@@ -18,7 +18,6 @@ import { URI } from 'vs/base/common/uri';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { toDisposable } from 'vs/base/common/lifecycle';
import { IMarkdownRenderResult } from 'vs/editor/browser/core/markdownRenderer';
import { NotebookMarkdownRenderer } from 'sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown';
import { CellView } from 'sql/workbench/contrib/notebook/browser/cellViews/interfaces';
@@ -32,6 +31,7 @@ import { highlightSelectedText } from 'sql/workbench/contrib/notebook/browser/ut
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode } from 'vs/base/common/keyCodes';
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
import { IMarkdownRenderResult } from 'vs/editor/contrib/markdownRenderer/browser/markdownRenderer';
export const TEXT_SELECTOR: string = 'text-cell-component';
const USER_SELECT_CLASS = 'actionselect';
@@ -11,7 +11,6 @@ import * as types from 'vs/base/common/types';
import { NotebookFindMatch, NotebookFindDecorations } from 'sql/workbench/contrib/notebook/browser/find/notebookFindDecorations';
import * as model from 'vs/editor/common/model';
import { ModelDecorationOptions, DidChangeDecorationsEmitter, createTextBuffer, TextModel } from 'vs/editor/common/model/textModel';
import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents';
import { IntervalNode } from 'vs/editor/common/model/intervalTree';
import { Range, IRange } from 'vs/editor/common/core/range';
import { onUnexpectedError } from 'vs/base/common/errors';
@@ -22,9 +21,10 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { NOTEBOOK_COMMAND_SEARCH } from 'sql/workbench/services/notebook/common/notebookContext';
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { ActiveEditorContext } from 'vs/workbench/common/editor';
import { NotebookRange } from 'sql/workbench/services/notebook/browser/notebookService';
import { nb } from 'azdata';
import { IModelDecorationsChangedEvent } from 'vs/editor/common/textModelEvents';
import { ActiveEditorContext } from 'vs/workbench/common/contextkeys';
function _normalizeOptions(options: model.IModelDecorationOptions): ModelDecorationOptions {
if (options instanceof ModelDecorationOptions) {

Some files were not shown because too many files have changed in this diff Show More