Merge VS Code 1.21 source code (#1067)

* Initial VS Code 1.21 file copy with patches

* A few more merges

* Post npm install

* Fix batch of build breaks

* Fix more build breaks

* Fix more build errors

* Fix more build breaks

* Runtime fixes 1

* Get connection dialog working with some todos

* Fix a few packaging issues

* Copy several node_modules to package build to fix loader issues

* Fix breaks from master

* A few more fixes

* Make tests pass

* First pass of license header updates

* Second pass of license header updates

* Fix restore dialog issues

* Remove add additional themes menu items

* fix select box issues where the list doesn't show up

* formatting

* Fix editor dispose issue

* Copy over node modules to correct location on all platforms
This commit is contained in:
Karl Burtram
2018-04-04 15:27:51 -07:00
committed by GitHub
parent 5fba3e31b4
commit dafb780987
9412 changed files with 141255 additions and 98813 deletions

View File

@@ -5,15 +5,13 @@
'use strict';
import * as assert from 'assert';
import * as editorCommon from 'vs/editor/common/editorCommon';
import { EditableTextModel } from 'vs/editor/common/model/editableTextModel';
import { MirrorModel } from 'vs/editor/common/model/mirrorModel';
import { TextModel } from 'vs/editor/common/model/textModel';
import { MirrorTextModel } from 'vs/editor/common/model/mirrorTextModel';
import { Position } from 'vs/editor/common/core/position';
import { RawTextSource } from 'vs/editor/common/model/textSource';
import { IModelContentChangedEvent } from 'vs/editor/common/model/textModelEvents';
import { EndOfLinePreference, IIdentifiedSingleEditOperation, EndOfLineSequence } from 'vs/editor/common/model';
export function testApplyEditsWithSyncedModels(original: string[], edits: editorCommon.IIdentifiedSingleEditOperation[], expected: string[], inputEditsAreInvalid: boolean = false): void {
export function testApplyEditsWithSyncedModels(original: string[], edits: IIdentifiedSingleEditOperation[], expected: string[], inputEditsAreInvalid: boolean = false): void {
var originalStr = original.join('\n');
var expectedStr = expected.join('\n');
@@ -22,7 +20,7 @@ export function testApplyEditsWithSyncedModels(original: string[], edits: editor
var inverseEdits = model.applyEdits(edits);
// Assert edits produced expected result
assert.deepEqual(model.getValue(editorCommon.EndOfLinePreference.LF), expectedStr);
assert.deepEqual(model.getValue(EndOfLinePreference.LF), expectedStr);
assertMirrorModels();
@@ -30,7 +28,7 @@ export function testApplyEditsWithSyncedModels(original: string[], edits: editor
var inverseInverseEdits = model.applyEdits(inverseEdits);
// Assert the inverse edits brought back model to original state
assert.deepEqual(model.getValue(editorCommon.EndOfLinePreference.LF), originalStr);
assert.deepEqual(model.getValue(EndOfLinePreference.LF), originalStr);
if (!inputEditsAreInvalid) {
// Assert the inverse of the inverse edits are the original edits
@@ -81,9 +79,9 @@ function assertLineMapping(model: TextModel, msg: string): void {
}
export function assertSyncedModels(text: string, callback: (model: EditableTextModel, assertMirrorModels: () => void) => void, setup: (model: EditableTextModel) => void = null): void {
var model = new EditableTextModel(RawTextSource.fromString(text), TextModel.DEFAULT_CREATION_OPTIONS, null);
model.setEOL(editorCommon.EndOfLineSequence.LF);
export function assertSyncedModels(text: string, callback: (model: TextModel, assertMirrorModels: () => void) => void, setup: (model: TextModel) => void = null): void {
var model = new TextModel(text, TextModel.DEFAULT_CREATION_OPTIONS, null);
model.setEOL(EndOfLineSequence.LF);
assertLineMapping(model, 'model');
if (setup) {
@@ -91,7 +89,7 @@ export function assertSyncedModels(text: string, callback: (model: EditableTextM
assertLineMapping(model, 'model');
}
var mirrorModel2 = new MirrorModel(null, model.getLinesContent(), model.getEOL(), model.getVersionId());
var mirrorModel2 = new MirrorTextModel(null, model.getLinesContent(), model.getEOL(), model.getVersionId());
var mirrorModel2PrevVersionId = model.getVersionId();
model.onDidChangeContent((e: IModelContentChangedEvent) => {