mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 09:38:26 -05:00
Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)
* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 * fix config changes * fix strictnull checks
This commit is contained in:
@@ -22,6 +22,7 @@ import { IPathData } from 'vs/platform/windows/common/windows';
|
||||
import { coalesce } from 'vs/base/common/arrays';
|
||||
|
||||
export const ActiveEditorContext = new RawContextKey<string | null>('activeEditor', null);
|
||||
export const ActiveEditorIsSaveableContext = new RawContextKey<boolean>('activeEditorIsSaveable', false);
|
||||
export const EditorsVisibleContext = new RawContextKey<boolean>('editorIsOpen', false);
|
||||
export const EditorPinnedContext = new RawContextKey<boolean>('editorPinned', false);
|
||||
export const EditorGroupActiveEditorDirtyContext = new RawContextKey<boolean>('groupActiveEditorDirty', false);
|
||||
@@ -30,7 +31,7 @@ export const NoEditorsVisibleContext: ContextKeyExpr = EditorsVisibleContext.toN
|
||||
export const TextCompareEditorVisibleContext = new RawContextKey<boolean>('textCompareEditorVisible', false);
|
||||
export const TextCompareEditorActiveContext = new RawContextKey<boolean>('textCompareEditorActive', false);
|
||||
export const ActiveEditorGroupEmptyContext = new RawContextKey<boolean>('activeEditorGroupEmpty', false);
|
||||
export const ActiveEditorGroupIndexContext = new RawContextKey<number>('activeEditorGroupIndex', -1);
|
||||
export const ActiveEditorGroupIndexContext = new RawContextKey<number>('activeEditorGroupIndex', 0);
|
||||
export const ActiveEditorGroupLastContext = new RawContextKey<boolean>('activeEditorGroupLast', false);
|
||||
export const MultipleEditorGroupsContext = new RawContextKey<boolean>('multipleEditorGroups', false);
|
||||
export const SingleEditorGroupsContext = MultipleEditorGroupsContext.toNegated();
|
||||
@@ -53,12 +54,12 @@ export interface IEditor {
|
||||
/**
|
||||
* The assigned input of this editor.
|
||||
*/
|
||||
input: IEditorInput | null;
|
||||
input: IEditorInput | undefined;
|
||||
|
||||
/**
|
||||
* The assigned options of this editor.
|
||||
*/
|
||||
options: IEditorOptions | null;
|
||||
options: IEditorOptions | undefined;
|
||||
|
||||
/**
|
||||
* The assigned group this editor is showing in.
|
||||
@@ -292,7 +293,7 @@ export interface IEditorInput extends IDisposable {
|
||||
/**
|
||||
* Returns the display name of this input.
|
||||
*/
|
||||
getName(): string | null;
|
||||
getName(): string | undefined;
|
||||
|
||||
/**
|
||||
* Returns the display description of this input.
|
||||
@@ -302,7 +303,7 @@ export interface IEditorInput extends IDisposable {
|
||||
/**
|
||||
* Returns the display title of this input.
|
||||
*/
|
||||
getTitle(verbosity?: Verbosity): string | null;
|
||||
getTitle(verbosity?: Verbosity): string | undefined;
|
||||
|
||||
/**
|
||||
* Resolves the input.
|
||||
@@ -358,8 +359,8 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
|
||||
* Returns the name of this input that can be shown to the user. Examples include showing the name of the input
|
||||
* above the editor area when the input is shown.
|
||||
*/
|
||||
getName(): string | null {
|
||||
return null;
|
||||
getName(): string | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -374,7 +375,7 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
|
||||
* Returns the title of this input that can be shown to the user. Examples include showing the title of
|
||||
* the input above the editor area as hover over the input label.
|
||||
*/
|
||||
getTitle(verbosity?: Verbosity): string | null {
|
||||
getTitle(verbosity?: Verbosity): string | undefined {
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@@ -733,7 +734,8 @@ export class EditorOptions implements IEditorOptions {
|
||||
|
||||
/**
|
||||
* This option is only relevant if an editor is opened into a group that is not active
|
||||
* already and allows to control if the inactive group should become active or not.
|
||||
* already and allows to control if the inactive group should become active, restored
|
||||
* or preserved.
|
||||
*
|
||||
* By default, the editor group will become active unless `preserveFocus` or `inactive`
|
||||
* is specified.
|
||||
@@ -783,6 +785,11 @@ export class EditorOptions implements IEditorOptions {
|
||||
*/
|
||||
ignoreError: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Does not use editor overrides while opening the editor.
|
||||
*/
|
||||
ignoreOverrides: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Overwrites option values from the provided bag.
|
||||
*/
|
||||
@@ -823,6 +830,10 @@ export class EditorOptions implements IEditorOptions {
|
||||
this.index = options.index;
|
||||
}
|
||||
|
||||
if (typeof options.ignoreOverrides === 'boolean') {
|
||||
this.ignoreOverrides = options.ignoreOverrides;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user