mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode fc10e26ea50f82cdd84e9141491357922e6f5fba (#4639)
This commit is contained in:
@@ -28,7 +28,7 @@ export class BinaryResourceDiffEditor extends SideBySideEditor {
|
||||
super(telemetryService, instantiationService, themeService, storageService);
|
||||
}
|
||||
|
||||
getMetadata(): string | null {
|
||||
getMetadata(): string | undefined {
|
||||
const master = this.masterEditor;
|
||||
const details = this.detailsEditor;
|
||||
|
||||
@@ -36,6 +36,6 @@ export class BinaryResourceDiffEditor extends SideBySideEditor {
|
||||
return nls.localize('metadataDiff', "{0} ↔ {1}", details.getMetadata(), master.getMetadata());
|
||||
}
|
||||
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor {
|
||||
get onDidOpenInPlace(): Event<void> { return this._onDidOpenInPlace.event; }
|
||||
|
||||
private callbacks: IOpenCallbacks;
|
||||
private metadata: string | null;
|
||||
private metadata: string | undefined;
|
||||
private binaryContainer: HTMLElement;
|
||||
private scrollbar: DomScrollableElement;
|
||||
private resourceViewerContext: ResourceViewerContext;
|
||||
@@ -110,20 +110,20 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor {
|
||||
});
|
||||
}
|
||||
|
||||
private handleMetadataChanged(meta: string | null): void {
|
||||
private handleMetadataChanged(meta: string | undefined): void {
|
||||
this.metadata = meta;
|
||||
|
||||
this._onMetadataChanged.fire();
|
||||
}
|
||||
|
||||
getMetadata() {
|
||||
getMetadata(): string | undefined {
|
||||
return this.metadata;
|
||||
}
|
||||
|
||||
clearInput(): void {
|
||||
|
||||
// Clear Meta
|
||||
this.handleMetadataChanged(null);
|
||||
this.handleMetadataChanged(undefined);
|
||||
|
||||
// Clear Resource Viewer
|
||||
clearNode(this.binaryContainer);
|
||||
|
||||
@@ -143,43 +143,35 @@ interface StateDelta {
|
||||
indentation?: string;
|
||||
tabFocusMode?: boolean;
|
||||
screenReaderMode?: boolean;
|
||||
metadata?: string | null;
|
||||
metadata?: string | undefined;
|
||||
}
|
||||
|
||||
class State {
|
||||
private _selectionStatus: string | null | undefined;
|
||||
get selectionStatus(): string | null | undefined { return this._selectionStatus; }
|
||||
private _selectionStatus: string | undefined;
|
||||
get selectionStatus(): string | undefined { return this._selectionStatus; }
|
||||
|
||||
private _mode: string | null | undefined;
|
||||
get mode(): string | null | undefined { return this._mode; }
|
||||
private _mode: string | undefined;
|
||||
get mode(): string | undefined { return this._mode; }
|
||||
|
||||
private _encoding: string | null | undefined;
|
||||
get encoding(): string | null | undefined { return this._encoding; }
|
||||
private _encoding: string | undefined;
|
||||
get encoding(): string | undefined { return this._encoding; }
|
||||
|
||||
private _EOL: string | null | undefined;
|
||||
get EOL(): string | null | undefined { return this._EOL; }
|
||||
private _EOL: string | undefined;
|
||||
get EOL(): string | undefined { return this._EOL; }
|
||||
|
||||
private _indentation: string | null | undefined;
|
||||
get indentation(): string | null | undefined { return this._indentation; }
|
||||
private _indentation: string | undefined;
|
||||
get indentation(): string | undefined { return this._indentation; }
|
||||
|
||||
private _tabFocusMode: boolean | null | undefined;
|
||||
get tabFocusMode(): boolean | null | undefined { return this._tabFocusMode; }
|
||||
private _tabFocusMode: boolean | undefined;
|
||||
get tabFocusMode(): boolean | undefined { return this._tabFocusMode; }
|
||||
|
||||
private _screenReaderMode: boolean | null | undefined;
|
||||
get screenReaderMode(): boolean | null | undefined { return this._screenReaderMode; }
|
||||
private _screenReaderMode: boolean | undefined;
|
||||
get screenReaderMode(): boolean | undefined { return this._screenReaderMode; }
|
||||
|
||||
private _metadata: string | null | undefined;
|
||||
get metadata(): string | null | undefined { return this._metadata; }
|
||||
private _metadata: string | undefined;
|
||||
get metadata(): string | undefined { return this._metadata; }
|
||||
|
||||
constructor() {
|
||||
this._selectionStatus = null;
|
||||
this._mode = null;
|
||||
this._encoding = null;
|
||||
this._EOL = null;
|
||||
this._tabFocusMode = false;
|
||||
this._screenReaderMode = false;
|
||||
this._metadata = null;
|
||||
}
|
||||
constructor() { }
|
||||
|
||||
update(update: StateDelta): StateChange {
|
||||
const change = new StateChange();
|
||||
|
||||
Reference in New Issue
Block a user