Merge from master

This commit is contained in:
Raj Musuku
2019-02-21 17:56:04 -08:00
parent 5a146e34fa
commit 666ae11639
11482 changed files with 119352 additions and 255574 deletions

View File

@@ -2,18 +2,16 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMarkdownString } from 'vs/base/common/htmlContent';
import URI, { UriComponents } from 'vs/base/common/uri';
import { TPromise } from 'vs/base/common/winjs.base';
import { IDisposable } from 'vs/base/common/lifecycle';
import { Position, IPosition } from 'vs/editor/common/core/position';
import { Range, IRange } from 'vs/editor/common/core/range';
import { Selection, ISelection } from 'vs/editor/common/core/selection';
import { URI, UriComponents } from 'vs/base/common/uri';
import * as editorOptions from 'vs/editor/common/config/editorOptions';
import { IPosition, Position } from 'vs/editor/common/core/position';
import { IRange, Range } from 'vs/editor/common/core/range';
import { ISelection, Selection } from 'vs/editor/common/core/selection';
import { IIdentifiedSingleEditOperation, IModelDecorationsChangeAccessor, ITextModel, OverviewRulerLane, TrackedRangeStickiness } from 'vs/editor/common/model';
import { ThemeColor } from 'vs/platform/theme/common/themeService';
import { ITextModel, IModelDecorationsChangeAccessor, TrackedRangeStickiness, OverviewRulerLane, IIdentifiedSingleEditOperation } from 'vs/editor/common/model';
/**
* A builder and helper for edit operations for a command.
@@ -24,7 +22,7 @@ export interface IEditOperationBuilder {
* @param range The range to replace (delete). May be empty to represent a simple insert.
* @param text The text to replace with. May be null to represent a simple delete.
*/
addEditOperation(range: Range, text: string): void;
addEditOperation(range: Range, text: string | null): void;
/**
* Add a new edit operation (a replace operation).
@@ -32,7 +30,7 @@ export interface IEditOperationBuilder {
* @param range The range to replace (delete). May be empty to represent a simple insert.
* @param text The text to replace with. May be null to represent a simple delete.
*/
addTrackedEditOperation(range: Range, text: string): void;
addTrackedEditOperation(range: Range, text: string | null): void;
/**
* Track `selection` when applying edit operations.
@@ -41,7 +39,7 @@ export interface IEditOperationBuilder {
* @param selection The selection to track.
* @param trackPreviousOnEmpty If set, and the selection is empty, indicates whether the selection
* should clamp to the previous or the next character.
* @return A unique identifer.
* @return A unique identifier.
*/
trackSelection(selection: Selection, trackPreviousOnEmpty?: boolean): string;
}
@@ -82,7 +80,7 @@ export interface ICommand {
/**
* Compute the cursor state after the edit operations were applied.
* @param model The model the commad has executed on.
* @param model The model the command has executed on.
* @param helper A helper to get inverse edit operations and to get previously tracked selections.
* @return The cursor state after the command executed.
*/
@@ -110,11 +108,11 @@ export interface IModelChangedEvent {
/**
* The `uri` of the previous model or null.
*/
readonly oldModelUrl: URI;
readonly oldModelUrl: URI | null;
/**
* The `uri` of the new model or null.
*/
readonly newModelUrl: URI;
readonly newModelUrl: URI | null;
}
export interface IDimension {
@@ -144,7 +142,7 @@ export interface ICharChange extends IChange {
* A line change
*/
export interface ILineChange extends IChange {
readonly charChanges: ICharChange[];
readonly charChanges: ICharChange[] | undefined;
}
/**
@@ -186,7 +184,7 @@ export interface IEditorAction {
readonly label: string;
readonly alias: string;
isSupported(): boolean;
run(): TPromise<void>;
run(): Promise<void>;
}
export type IEditorModel = ITextModel | IDiffEditorModel;
@@ -303,7 +301,7 @@ export interface IEditor {
/**
* Saves current view state of the editor in a serializable object.
*/
saveViewState(): IEditorViewState;
saveViewState(): IEditorViewState | null;
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
@@ -318,7 +316,7 @@ export interface IEditor {
/**
* Returns the primary position of the cursor.
*/
getPosition(): Position;
getPosition(): Position | null;
/**
* Set the primary position of the cursor. This will remove any secondary cursors.
@@ -359,12 +357,12 @@ export interface IEditor {
/**
* Returns the primary selection of the editor.
*/
getSelection(): Selection;
getSelection(): Selection | null;
/**
* Returns all the selections of the editor.
*/
getSelections(): Selection[];
getSelections(): Selection[] | null;
/**
* Set the primary selection of the editor. This will remove any secondary cursors.
@@ -439,7 +437,7 @@ export interface IEditor {
/**
* Gets the current model attached to this editor.
*/
getModel(): IEditorModel;
getModel(): IEditorModel | null;
/**
* Sets the current model attached to this editor.
@@ -449,7 +447,7 @@ export interface IEditor {
* will not be destroyed.
* It is safe to call setModel(null) to simply detach the current model from the editor.
*/
setModel(model: IEditorModel): void;
setModel(model: IEditorModel | null): void;
/**
* Change the decorations. All decorations added through this changeAccessor
@@ -536,10 +534,10 @@ export interface IThemeDecorationRenderOptions {
textDecoration?: string;
cursor?: string;
color?: string | ThemeColor;
opacity?: number;
opacity?: string;
letterSpacing?: string;
gutterIconPath?: string | UriComponents;
gutterIconPath?: UriComponents;
gutterIconSize?: string;
overviewRulerColor?: string | ThemeColor;
@@ -553,7 +551,7 @@ export interface IThemeDecorationRenderOptions {
*/
export interface IContentDecorationRenderOptions {
contentText?: string;
contentIconPath?: string | UriComponents;
contentIconPath?: UriComponents;
border?: string;
borderColor?: string | ThemeColor;