mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -31,7 +31,7 @@ export interface ITabFocus {
|
||||
setTabFocusMode(tabFocusMode: boolean): void;
|
||||
}
|
||||
|
||||
export const TabFocus: ITabFocus = new class {
|
||||
export const TabFocus: ITabFocus = new class implements ITabFocus {
|
||||
private _tabFocus: boolean = false;
|
||||
|
||||
private _onDidChangeTabFocus: Emitter<boolean> = new Emitter<boolean>();
|
||||
@@ -203,9 +203,15 @@ const editorConfiguration: IConfigurationNode = {
|
||||
},
|
||||
'editor.lineNumbers': {
|
||||
'type': 'string',
|
||||
'enum': ['off', 'on', 'relative'],
|
||||
'enum': ['off', 'on', 'relative', 'interval'],
|
||||
'enumDescriptions': [
|
||||
nls.localize('lineNumbers.off', "Line numbers are not rendered."),
|
||||
nls.localize('lineNumbers.on', "Line numbers are rendered as absolute number."),
|
||||
nls.localize('lineNumbers.relative', "Line numbers are rendered as distance in lines to cursor position."),
|
||||
nls.localize('lineNumbers.interval', "Line numbers are rendered every 10 lines.")
|
||||
],
|
||||
'default': 'on',
|
||||
'description': nls.localize('lineNumbers', "Controls the display of line numbers. Possible values are 'on', 'off', and 'relative'. 'relative' shows the line count from the current cursor position.")
|
||||
'description': nls.localize('lineNumbers', "Controls the display of line numbers. Possible values are 'on', 'off', and 'relative'.")
|
||||
},
|
||||
'editor.rulers': {
|
||||
'type': 'array',
|
||||
@@ -224,13 +230,13 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'type': 'number',
|
||||
'default': EDITOR_MODEL_DEFAULTS.tabSize,
|
||||
'minimum': 1,
|
||||
'description': nls.localize('tabSize', "The number of spaces a tab is equal to. This setting is overriden based on the file contents when `editor.detectIndentation` is on."),
|
||||
'description': nls.localize('tabSize', "The number of spaces a tab is equal to. This setting is overridden based on the file contents when `editor.detectIndentation` is on."),
|
||||
'errorMessage': nls.localize('tabSize.errorMessage', "Expected 'number'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.")
|
||||
},
|
||||
'editor.insertSpaces': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_MODEL_DEFAULTS.insertSpaces,
|
||||
'description': nls.localize('insertSpaces', "Insert spaces when pressing Tab. This setting is overriden based on the file contents when `editor.detectIndentation` is on."),
|
||||
'description': nls.localize('insertSpaces', "Insert spaces when pressing Tab. This setting is overridden based on the file contents when `editor.detectIndentation` is on."),
|
||||
'errorMessage': nls.localize('insertSpaces.errorMessage', "Expected 'boolean'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.")
|
||||
},
|
||||
'editor.detectIndentation': {
|
||||
@@ -284,6 +290,11 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'default': EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection,
|
||||
'description': nls.localize('find.autoFindInSelection', "Controls if Find in Selection flag is turned on when multiple characters or lines of text are selected in the editor")
|
||||
},
|
||||
'editor.find.globalFindClipboard': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.contribInfo.find.globalFindClipboard,
|
||||
'description': nls.localize('find.globalFindClipboard', "Controls if the Find Widget should read or modify the shared find clipboard on macOS")
|
||||
},
|
||||
'editor.wordWrap': {
|
||||
'type': 'string',
|
||||
'enum': ['off', 'on', 'wordWrapColumn', 'bounded'],
|
||||
@@ -603,6 +614,12 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'default': EDITOR_DEFAULTS.contribInfo.lightbulbEnabled,
|
||||
'description': nls.localize('codeActions', "Enables the code action lightbulb")
|
||||
},
|
||||
'editor.selectionClipboard': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.contribInfo.selectionClipboard,
|
||||
'description': nls.localize('selectionClipboard', "Controls if the Linux primary clipboard should be supported."),
|
||||
'included': platform.isLinux
|
||||
},
|
||||
'diffEditor.renderSideBySide': {
|
||||
'type': 'boolean',
|
||||
'default': true,
|
||||
@@ -621,12 +638,4 @@ const editorConfiguration: IConfigurationNode = {
|
||||
}
|
||||
};
|
||||
|
||||
if (platform.isLinux) {
|
||||
editorConfiguration['properties']['editor.selectionClipboard'] = {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.contribInfo.selectionClipboard,
|
||||
'description': nls.localize('selectionClipboard', "Controls if the Linux primary clipboard should be supported.")
|
||||
};
|
||||
}
|
||||
|
||||
configurationRegistry.registerConfiguration(editorConfiguration);
|
||||
|
||||
@@ -86,6 +86,11 @@ export interface IEditorFindOptions {
|
||||
* Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor.
|
||||
*/
|
||||
autoFindInSelection: boolean;
|
||||
/**
|
||||
* @internal
|
||||
* Controls if the Find Widget should read or modify the shared find clipboard on macOS
|
||||
*/
|
||||
globalFindClipboard: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -160,7 +165,7 @@ export interface IEditorOptions {
|
||||
* Otherwise, line numbers will not be rendered.
|
||||
* Defaults to true.
|
||||
*/
|
||||
lineNumbers?: 'on' | 'off' | 'relative' | ((lineNumber: number) => string);
|
||||
lineNumbers?: 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
|
||||
/**
|
||||
* Should the corresponding line be selected when clicking on the line number?
|
||||
* Defaults to true.
|
||||
@@ -739,6 +744,10 @@ export interface InternalEditorMinimapOptions {
|
||||
export interface InternalEditorFindOptions {
|
||||
readonly seedSearchStringFromSelection: boolean;
|
||||
readonly autoFindInSelection: boolean;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
readonly globalFindClipboard: boolean;
|
||||
}
|
||||
|
||||
export interface EditorWrappingInfo {
|
||||
@@ -753,14 +762,21 @@ export interface EditorWrappingInfo {
|
||||
readonly wordWrapBreakObtrusiveCharacters: string;
|
||||
}
|
||||
|
||||
export const enum RenderLineNumbersType {
|
||||
Off = 0,
|
||||
On = 1,
|
||||
Relative = 2,
|
||||
Interval = 3,
|
||||
Custom = 4
|
||||
}
|
||||
|
||||
export interface InternalEditorViewOptions {
|
||||
readonly extraEditorClassName: string;
|
||||
readonly disableMonospaceOptimizations: boolean;
|
||||
readonly rulers: number[];
|
||||
readonly ariaLabel: string;
|
||||
readonly renderLineNumbers: boolean;
|
||||
readonly renderLineNumbers: RenderLineNumbersType;
|
||||
readonly renderCustomLineNumbers: (lineNumber: number) => string;
|
||||
readonly renderRelativeLineNumbers: boolean;
|
||||
readonly selectOnLineNumbers: boolean;
|
||||
readonly glyphMargin: boolean;
|
||||
readonly revealHorizontalRightPadding: number;
|
||||
@@ -1029,7 +1045,6 @@ export class InternalEditorOptions {
|
||||
&& a.ariaLabel === b.ariaLabel
|
||||
&& a.renderLineNumbers === b.renderLineNumbers
|
||||
&& a.renderCustomLineNumbers === b.renderCustomLineNumbers
|
||||
&& a.renderRelativeLineNumbers === b.renderRelativeLineNumbers
|
||||
&& a.selectOnLineNumbers === b.selectOnLineNumbers
|
||||
&& a.glyphMargin === b.glyphMargin
|
||||
&& a.revealHorizontalRightPadding === b.revealHorizontalRightPadding
|
||||
@@ -1106,6 +1121,7 @@ export class InternalEditorOptions {
|
||||
return (
|
||||
a.seedSearchStringFromSelection === b.seedSearchStringFromSelection
|
||||
&& a.autoFindInSelection === b.autoFindInSelection
|
||||
&& a.globalFindClipboard === b.globalFindClipboard
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1544,7 +1560,8 @@ export class EditorOptionsValidator {
|
||||
|
||||
return {
|
||||
seedSearchStringFromSelection: _boolean(opts.seedSearchStringFromSelection, defaults.seedSearchStringFromSelection),
|
||||
autoFindInSelection: _boolean(opts.autoFindInSelection, defaults.autoFindInSelection)
|
||||
autoFindInSelection: _boolean(opts.autoFindInSelection, defaults.autoFindInSelection),
|
||||
globalFindClipboard: _boolean(opts.globalFindClipboard, defaults.globalFindClipboard)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1558,9 +1575,8 @@ export class EditorOptionsValidator {
|
||||
rulers.sort();
|
||||
}
|
||||
|
||||
let renderLineNumbers: boolean = defaults.renderLineNumbers;
|
||||
let renderLineNumbers: RenderLineNumbersType = defaults.renderLineNumbers;
|
||||
let renderCustomLineNumbers: (lineNumber: number) => string = defaults.renderCustomLineNumbers;
|
||||
let renderRelativeLineNumbers: boolean = defaults.renderRelativeLineNumbers;
|
||||
|
||||
if (typeof opts.lineNumbers !== 'undefined') {
|
||||
let lineNumbers = opts.lineNumbers;
|
||||
@@ -1573,21 +1589,16 @@ export class EditorOptionsValidator {
|
||||
}
|
||||
|
||||
if (typeof lineNumbers === 'function') {
|
||||
renderLineNumbers = true;
|
||||
renderLineNumbers = RenderLineNumbersType.Custom;
|
||||
renderCustomLineNumbers = lineNumbers;
|
||||
renderRelativeLineNumbers = false;
|
||||
} else if (lineNumbers === 'interval') {
|
||||
renderLineNumbers = RenderLineNumbersType.Interval;
|
||||
} else if (lineNumbers === 'relative') {
|
||||
renderLineNumbers = true;
|
||||
renderCustomLineNumbers = null;
|
||||
renderRelativeLineNumbers = true;
|
||||
renderLineNumbers = RenderLineNumbersType.Relative;
|
||||
} else if (lineNumbers === 'on') {
|
||||
renderLineNumbers = true;
|
||||
renderCustomLineNumbers = null;
|
||||
renderRelativeLineNumbers = false;
|
||||
renderLineNumbers = RenderLineNumbersType.On;
|
||||
} else {
|
||||
renderLineNumbers = false;
|
||||
renderCustomLineNumbers = null;
|
||||
renderRelativeLineNumbers = false;
|
||||
renderLineNumbers = RenderLineNumbersType.Off;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1627,7 +1638,6 @@ export class EditorOptionsValidator {
|
||||
ariaLabel: _string(opts.ariaLabel, defaults.ariaLabel),
|
||||
renderLineNumbers: renderLineNumbers,
|
||||
renderCustomLineNumbers: renderCustomLineNumbers,
|
||||
renderRelativeLineNumbers: renderRelativeLineNumbers,
|
||||
selectOnLineNumbers: _boolean(opts.selectOnLineNumbers, defaults.selectOnLineNumbers),
|
||||
glyphMargin: _boolean(opts.glyphMargin, defaults.glyphMargin),
|
||||
revealHorizontalRightPadding: _clampedInt(opts.revealHorizontalRightPadding, defaults.revealHorizontalRightPadding, 0, 1000),
|
||||
@@ -1730,7 +1740,6 @@ export class InternalEditorOptionsFactory {
|
||||
ariaLabel: (accessibilityIsOff ? nls.localize('accessibilityOffAriaLabel', "The editor is not accessible at this time. Press Alt+F1 for options.") : opts.viewInfo.ariaLabel),
|
||||
renderLineNumbers: opts.viewInfo.renderLineNumbers,
|
||||
renderCustomLineNumbers: opts.viewInfo.renderCustomLineNumbers,
|
||||
renderRelativeLineNumbers: opts.viewInfo.renderRelativeLineNumbers,
|
||||
selectOnLineNumbers: opts.viewInfo.selectOnLineNumbers,
|
||||
glyphMargin: opts.viewInfo.glyphMargin,
|
||||
revealHorizontalRightPadding: opts.viewInfo.revealHorizontalRightPadding,
|
||||
@@ -1822,7 +1831,7 @@ export class InternalEditorOptionsFactory {
|
||||
outerHeight: env.outerHeight,
|
||||
showGlyphMargin: opts.viewInfo.glyphMargin,
|
||||
lineHeight: env.fontInfo.lineHeight,
|
||||
showLineNumbers: opts.viewInfo.renderLineNumbers,
|
||||
showLineNumbers: (opts.viewInfo.renderLineNumbers !== RenderLineNumbersType.Off),
|
||||
lineNumbersMinChars: opts.lineNumbersMinChars,
|
||||
lineNumbersDigitCount: env.lineNumbersDigitCount,
|
||||
lineDecorationsWidth: lineDecorationsWidth,
|
||||
@@ -2152,9 +2161,8 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
|
||||
disableMonospaceOptimizations: false,
|
||||
rulers: [],
|
||||
ariaLabel: nls.localize('editorViewAccessibleLabel', "Editor content"),
|
||||
renderLineNumbers: true,
|
||||
renderLineNumbers: RenderLineNumbersType.On,
|
||||
renderCustomLineNumbers: null,
|
||||
renderRelativeLineNumbers: false,
|
||||
selectOnLineNumbers: true,
|
||||
glyphMargin: true,
|
||||
revealHorizontalRightPadding: 30,
|
||||
@@ -2223,7 +2231,8 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
|
||||
matchBrackets: true,
|
||||
find: {
|
||||
seedSearchStringFromSelection: true,
|
||||
autoFindInSelection: false
|
||||
autoFindInSelection: false,
|
||||
globalFindClipboard: true
|
||||
},
|
||||
colorDecorators: true,
|
||||
lightbulbEnabled: true
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface IEditorZoom {
|
||||
setZoomLevel(zoomLevel: number): void;
|
||||
}
|
||||
|
||||
export const EditorZoom: IEditorZoom = new class {
|
||||
export const EditorZoom: IEditorZoom = new class implements IEditorZoom {
|
||||
|
||||
private _zoomLevel: number = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user