mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -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:
@@ -16,7 +16,7 @@ import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode';
|
||||
import { ISashEvent, IVerticalSashLayoutProvider, Sash } from 'vs/base/browser/ui/sash/sash';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { Range, IRange } from 'vs/editor/common/core/range';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService';
|
||||
@@ -28,7 +28,7 @@ import { ViewLineToken } from 'vs/editor/common/core/viewLineToken';
|
||||
import { Configuration } from 'vs/editor/browser/config/configuration';
|
||||
import { Position, IPosition } from 'vs/editor/common/core/position';
|
||||
import { Selection, ISelection } from 'vs/editor/common/core/selection';
|
||||
import { InlineDecoration } from 'vs/editor/common/viewModel/viewModel';
|
||||
import { InlineDecoration, InlineDecorationType } from 'vs/editor/common/viewModel/viewModel';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { ColorId, MetadataConsts, FontStyle } from 'vs/editor/common/modes';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
@@ -137,9 +137,9 @@ let DIFF_EDITOR_ID = 0;
|
||||
|
||||
export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffEditor {
|
||||
|
||||
private static ONE_OVERVIEW_WIDTH = 15;
|
||||
public static ENTIRE_DIFF_OVERVIEW_WIDTH = 30;
|
||||
private static UPDATE_DIFF_DECORATIONS_DELAY = 200; // ms
|
||||
private static readonly ONE_OVERVIEW_WIDTH = 15;
|
||||
public static readonly ENTIRE_DIFF_OVERVIEW_WIDTH = 30;
|
||||
private static readonly UPDATE_DIFF_DECORATIONS_DELAY = 200; // ms
|
||||
|
||||
private readonly _onDidDispose: Emitter<void> = this._register(new Emitter<void>());
|
||||
public readonly onDidDispose: Event<void> = this._onDidDispose.event;
|
||||
@@ -462,10 +462,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
|
||||
return instantiationService.createInstance(CodeEditor, container, options);
|
||||
}
|
||||
|
||||
public destroy(): void {
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this._codeEditorService.removeDiffEditor(this);
|
||||
|
||||
@@ -567,10 +563,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
|
||||
}
|
||||
}
|
||||
|
||||
public getValue(options: { preserveBOM: boolean; lineEnding: string; } = null): string {
|
||||
return this.modifiedEditor.getValue(options);
|
||||
}
|
||||
|
||||
public getModel(): editorCommon.IDiffEditorModel {
|
||||
return {
|
||||
original: this.originalEditor.getModel(),
|
||||
@@ -701,18 +693,10 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
|
||||
this.modifiedEditor.revealRangeAtTop(range, scrollType);
|
||||
}
|
||||
|
||||
public getActions(): editorCommon.IEditorAction[] {
|
||||
return this.modifiedEditor.getActions();
|
||||
}
|
||||
|
||||
public getSupportedActions(): editorCommon.IEditorAction[] {
|
||||
return this.modifiedEditor.getSupportedActions();
|
||||
}
|
||||
|
||||
public getAction(id: string): editorCommon.IEditorAction {
|
||||
return this.modifiedEditor.getAction(id);
|
||||
}
|
||||
|
||||
public saveViewState(): editorCommon.IDiffEditorViewState {
|
||||
let originalViewState = this.originalEditor.saveViewState();
|
||||
let modifiedViewState = this.modifiedEditor.saveViewState();
|
||||
@@ -919,7 +903,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
|
||||
}
|
||||
|
||||
private _adjustOptionsForSubEditor(options: editorOptions.IDiffEditorOptions): editorOptions.IDiffEditorOptions {
|
||||
let clonedOptions: editorOptions.IDiffEditorOptions = objects.clone(options || {});
|
||||
let clonedOptions: editorOptions.IDiffEditorOptions = objects.deepClone(options || {});
|
||||
clonedOptions.inDiffEditor = true;
|
||||
clonedOptions.wordWrap = 'off';
|
||||
clonedOptions.wordWrapMinified = false;
|
||||
@@ -1131,7 +1115,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
|
||||
return originalEquivalentLineNumber + lineChangeOriginalLength - lineChangeModifiedLength + delta;
|
||||
}
|
||||
|
||||
public getDiffLineInformationForOriginal(lineNumber: number): editorCommon.IDiffLineInformation {
|
||||
public getDiffLineInformationForOriginal(lineNumber: number): editorBrowser.IDiffLineInformation {
|
||||
if (!this._lineChanges) {
|
||||
// Cannot answer that which I don't know
|
||||
return null;
|
||||
@@ -1141,7 +1125,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
|
||||
};
|
||||
}
|
||||
|
||||
public getDiffLineInformationForModified(lineNumber: number): editorCommon.IDiffLineInformation {
|
||||
public getDiffLineInformationForModified(lineNumber: number): editorBrowser.IDiffLineInformation {
|
||||
if (!this._lineChanges) {
|
||||
// Cannot answer that which I don't know
|
||||
return null;
|
||||
@@ -1516,10 +1500,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd
|
||||
this._sash.disable();
|
||||
}
|
||||
|
||||
this._sash.addListener('start', () => this.onSashDragStart());
|
||||
this._sash.addListener('change', (e: ISashEvent) => this.onSashDrag(e));
|
||||
this._sash.addListener('end', () => this.onSashDragEnd());
|
||||
this._sash.addListener('reset', () => this.onSashReset());
|
||||
this._sash.onDidStart(() => this.onSashDragStart());
|
||||
this._sash.onDidChange((e: ISashEvent) => this.onSashDrag(e));
|
||||
this._sash.onDidEnd(() => this.onSashDragEnd());
|
||||
this._sash.onDidReset(() => this.onSashReset());
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
@@ -1938,7 +1922,7 @@ class InlineViewZonesComputer extends ViewZonesComputer {
|
||||
decorations.push(new InlineDecoration(
|
||||
new Range(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn),
|
||||
'char-delete',
|
||||
false
|
||||
InlineDecorationType.Regular
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -2056,4 +2040,4 @@ registerThemingParticipant((theme, collector) => {
|
||||
if (shadow) {
|
||||
collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${shadow}; }`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user