提交 5c02b503 编写于 作者: J Johannes Rieken

extHost.protocol should not depend on extHostTypes, #70319

上级 888415c1
...@@ -10,11 +10,10 @@ import { RenderLineNumbersType, TextEditorCursorStyle, cursorStyleToString } fro ...@@ -10,11 +10,10 @@ import { RenderLineNumbersType, TextEditorCursorStyle, cursorStyleToString } fro
import { IRange, Range } from 'vs/editor/common/core/range'; import { IRange, Range } from 'vs/editor/common/core/range';
import { ISelection, Selection } from 'vs/editor/common/core/selection'; import { ISelection, Selection } from 'vs/editor/common/core/selection';
import * as editorCommon from 'vs/editor/common/editorCommon'; import * as editorCommon from 'vs/editor/common/editorCommon';
import { EndOfLineSequence, IIdentifiedSingleEditOperation, ISingleEditOperation, ITextModel, ITextModelUpdateOptions } from 'vs/editor/common/model'; import { IIdentifiedSingleEditOperation, ISingleEditOperation, ITextModel, ITextModelUpdateOptions } from 'vs/editor/common/model';
import { IModelService } from 'vs/editor/common/services/modelService'; import { IModelService } from 'vs/editor/common/services/modelService';
import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2'; import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2';
import { IApplyEditsOptions, IEditorPropertiesChangeData, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate, IUndoStopOptions, TextEditorRevealType } from 'vs/workbench/api/node/extHost.protocol'; import { IApplyEditsOptions, IEditorPropertiesChangeData, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate, IUndoStopOptions, TextEditorRevealType } from 'vs/workbench/api/node/extHost.protocol';
import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes';
import { IEditor } from 'vs/workbench/common/editor'; import { IEditor } from 'vs/workbench/common/editor';
import { withNullAsUndefined } from 'vs/base/common/types'; import { withNullAsUndefined } from 'vs/base/common/types';
...@@ -57,28 +56,17 @@ export class MainThreadTextEditorProperties { ...@@ -57,28 +56,17 @@ export class MainThreadTextEditorProperties {
} }
let cursorStyle: TextEditorCursorStyle; let cursorStyle: TextEditorCursorStyle;
let lineNumbers: TextEditorLineNumbersStyle; let lineNumbers: RenderLineNumbersType;
if (codeEditor) { if (codeEditor) {
const codeEditorOpts = codeEditor.getConfiguration(); const codeEditorOpts = codeEditor.getConfiguration();
cursorStyle = codeEditorOpts.viewInfo.cursorStyle; cursorStyle = codeEditorOpts.viewInfo.cursorStyle;
lineNumbers = codeEditorOpts.viewInfo.renderLineNumbers;
switch (codeEditorOpts.viewInfo.renderLineNumbers) {
case RenderLineNumbersType.Off:
lineNumbers = TextEditorLineNumbersStyle.Off;
break;
case RenderLineNumbersType.Relative:
lineNumbers = TextEditorLineNumbersStyle.Relative;
break;
default:
lineNumbers = TextEditorLineNumbersStyle.On;
break;
}
} else if (previousProperties) { } else if (previousProperties) {
cursorStyle = previousProperties.options.cursorStyle; cursorStyle = previousProperties.options.cursorStyle;
lineNumbers = previousProperties.options.lineNumbers; lineNumbers = previousProperties.options.lineNumbers;
} else { } else {
cursorStyle = TextEditorCursorStyle.Line; cursorStyle = TextEditorCursorStyle.Line;
lineNumbers = TextEditorLineNumbersStyle.On; lineNumbers = RenderLineNumbersType.On;
} }
const modelOptions = model.getOptions(); const modelOptions = model.getOptions();
...@@ -377,10 +365,10 @@ export class MainThreadTextEditor { ...@@ -377,10 +365,10 @@ export class MainThreadTextEditor {
if (typeof newConfiguration.lineNumbers !== 'undefined') { if (typeof newConfiguration.lineNumbers !== 'undefined') {
let lineNumbers: 'on' | 'off' | 'relative'; let lineNumbers: 'on' | 'off' | 'relative';
switch (newConfiguration.lineNumbers) { switch (newConfiguration.lineNumbers) {
case TextEditorLineNumbersStyle.On: case RenderLineNumbersType.On:
lineNumbers = 'on'; lineNumbers = 'on';
break; break;
case TextEditorLineNumbersStyle.Relative: case RenderLineNumbersType.Relative:
lineNumbers = 'relative'; lineNumbers = 'relative';
break; break;
default: default:
...@@ -459,11 +447,7 @@ export class MainThreadTextEditor { ...@@ -459,11 +447,7 @@ export class MainThreadTextEditor {
return false; return false;
} }
if (opts.setEndOfLine === EndOfLine.CRLF) { this._model.pushEOL(opts.setEndOfLine);
this._model.pushEOL(EndOfLineSequence.CRLF);
} else if (opts.setEndOfLine === EndOfLine.LF) {
this._model.pushEOL(EndOfLineSequence.LF);
}
const transformedEdits = edits.map((edit): IIdentifiedSingleEditOperation => { const transformedEdits = edits.map((edit): IIdentifiedSingleEditOperation => {
return { return {
......
...@@ -8,12 +8,12 @@ import { SerializedError } from 'vs/base/common/errors'; ...@@ -8,12 +8,12 @@ import { SerializedError } from 'vs/base/common/errors';
import { IDisposable } from 'vs/base/common/lifecycle'; import { IDisposable } from 'vs/base/common/lifecycle';
import Severity from 'vs/base/common/severity'; import Severity from 'vs/base/common/severity';
import { URI, UriComponents } from 'vs/base/common/uri'; import { URI, UriComponents } from 'vs/base/common/uri';
import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; import { TextEditorCursorStyle, RenderLineNumbersType } from 'vs/editor/common/config/editorOptions';
import { IPosition } from 'vs/editor/common/core/position'; import { IPosition } from 'vs/editor/common/core/position';
import { IRange } from 'vs/editor/common/core/range'; import { IRange } from 'vs/editor/common/core/range';
import { ISelection, Selection } from 'vs/editor/common/core/selection'; import { ISelection, Selection } from 'vs/editor/common/core/selection';
import * as editorCommon from 'vs/editor/common/editorCommon'; import * as editorCommon from 'vs/editor/common/editorCommon';
import { ISingleEditOperation } from 'vs/editor/common/model'; import { ISingleEditOperation, EndOfLineSequence } from 'vs/editor/common/model';
import { IModelChangedEvent } from 'vs/editor/common/model/mirrorTextModel'; import { IModelChangedEvent } from 'vs/editor/common/model/mirrorTextModel';
import * as modes from 'vs/editor/common/modes'; import * as modes from 'vs/editor/common/modes';
import { CharacterPair, CommentRule, EnterAction } from 'vs/editor/common/modes/languageConfiguration'; import { CharacterPair, CommentRule, EnterAction } from 'vs/editor/common/modes/languageConfiguration';
...@@ -29,7 +29,6 @@ import { IPatternInfo, IRawFileMatch2, IRawQuery, IRawTextQuery, ISearchComplete ...@@ -29,7 +29,6 @@ import { IPatternInfo, IRawFileMatch2, IRawQuery, IRawTextQuery, ISearchComplete
import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar';
import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
import { ThemeColor } from 'vs/platform/theme/common/themeService'; import { ThemeColor } from 'vs/platform/theme/common/themeService';
import { EndOfLine, IFileOperationOptions, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes';
import { EditorViewColumn } from 'vs/workbench/api/shared/editor'; import { EditorViewColumn } from 'vs/workbench/api/shared/editor';
import { TaskDTO, TaskExecutionDTO, TaskFilterDTO, TaskHandleDTO, TaskProcessEndedDTO, TaskProcessStartedDTO, TaskSystemInfoDTO, TaskSetDTO } from 'vs/workbench/api/shared/tasks'; import { TaskDTO, TaskExecutionDTO, TaskFilterDTO, TaskHandleDTO, TaskProcessEndedDTO, TaskProcessStartedDTO, TaskSystemInfoDTO, TaskSetDTO } from 'vs/workbench/api/shared/tasks';
import { ITreeItem, IRevealOptions } from 'vs/workbench/common/views'; import { ITreeItem, IRevealOptions } from 'vs/workbench/common/views';
...@@ -194,7 +193,7 @@ export interface ITextEditorConfigurationUpdate { ...@@ -194,7 +193,7 @@ export interface ITextEditorConfigurationUpdate {
indentSize?: number | 'tabSize'; indentSize?: number | 'tabSize';
insertSpaces?: boolean | 'auto'; insertSpaces?: boolean | 'auto';
cursorStyle?: TextEditorCursorStyle; cursorStyle?: TextEditorCursorStyle;
lineNumbers?: TextEditorLineNumbersStyle; lineNumbers?: RenderLineNumbersType;
} }
export interface IResolvedTextEditorConfiguration { export interface IResolvedTextEditorConfiguration {
...@@ -202,7 +201,7 @@ export interface IResolvedTextEditorConfiguration { ...@@ -202,7 +201,7 @@ export interface IResolvedTextEditorConfiguration {
indentSize: number; indentSize: number;
insertSpaces: boolean; insertSpaces: boolean;
cursorStyle: TextEditorCursorStyle; cursorStyle: TextEditorCursorStyle;
lineNumbers: TextEditorLineNumbersStyle; lineNumbers: RenderLineNumbersType;
} }
export enum TextEditorRevealType { export enum TextEditorRevealType {
...@@ -218,7 +217,7 @@ export interface IUndoStopOptions { ...@@ -218,7 +217,7 @@ export interface IUndoStopOptions {
} }
export interface IApplyEditsOptions extends IUndoStopOptions { export interface IApplyEditsOptions extends IUndoStopOptions {
setEndOfLine: EndOfLine; setEndOfLine: EndOfLineSequence;
} }
export interface ITextDocumentShowOptions { export interface ITextDocumentShowOptions {
...@@ -868,7 +867,12 @@ export interface WorkspaceSymbolsDto extends IdObject { ...@@ -868,7 +867,12 @@ export interface WorkspaceSymbolsDto extends IdObject {
export interface ResourceFileEditDto { export interface ResourceFileEditDto {
oldUri?: UriComponents; oldUri?: UriComponents;
newUri?: UriComponents; newUri?: UriComponents;
options?: IFileOperationOptions; options?: {
overwrite?: boolean;
ignoreIfExists?: boolean;
ignoreIfNotExists?: boolean;
recursive?: boolean;
};
} }
export interface ResourceTextEditDto { export interface ResourceTextEditDto {
......
...@@ -158,7 +158,7 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions { ...@@ -158,7 +158,7 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions {
this._indentSize = source.indentSize; this._indentSize = source.indentSize;
this._insertSpaces = source.insertSpaces; this._insertSpaces = source.insertSpaces;
this._cursorStyle = source.cursorStyle; this._cursorStyle = source.cursorStyle;
this._lineNumbers = source.lineNumbers; this._lineNumbers = TypeConverters.TextEditorLineNumbersStyle.to(source.lineNumbers);
} }
public get tabSize(): number | string { public get tabSize(): number | string {
...@@ -295,7 +295,7 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions { ...@@ -295,7 +295,7 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions {
} }
this._lineNumbers = value; this._lineNumbers = value;
warnOnError(this._proxy.$trySetOptions(this._id, { warnOnError(this._proxy.$trySetOptions(this._id, {
lineNumbers: value lineNumbers: TypeConverters.TextEditorLineNumbersStyle.from(value)
})); }));
} }
...@@ -354,7 +354,7 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions { ...@@ -354,7 +354,7 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions {
if (this._lineNumbers !== newOptions.lineNumbers) { if (this._lineNumbers !== newOptions.lineNumbers) {
this._lineNumbers = newOptions.lineNumbers; this._lineNumbers = newOptions.lineNumbers;
hasUpdate = true; hasUpdate = true;
bulkConfigurationUpdate.lineNumbers = newOptions.lineNumbers; bulkConfigurationUpdate.lineNumbers = TypeConverters.TextEditorLineNumbersStyle.from(newOptions.lineNumbers);
} }
} }
...@@ -607,7 +607,7 @@ export class ExtHostTextEditor implements vscode.TextEditor { ...@@ -607,7 +607,7 @@ export class ExtHostTextEditor implements vscode.TextEditor {
}); });
return this._proxy.$tryApplyEdits(this._id, editData.documentVersionId, edits, { return this._proxy.$tryApplyEdits(this._id, editData.documentVersionId, edits, {
setEndOfLine: editData.setEndOfLine, setEndOfLine: TypeConverters.EndOfLine.from(editData.setEndOfLine),
undoStopBefore: editData.undoStopBefore, undoStopBefore: editData.undoStopBefore,
undoStopAfter: editData.undoStopAfter undoStopAfter: editData.undoStopAfter
}); });
......
...@@ -118,7 +118,7 @@ export class ExtHostEditors implements ExtHostEditorsShape { ...@@ -118,7 +118,7 @@ export class ExtHostEditors implements ExtHostEditorsShape {
if (data.options) { if (data.options) {
this._onDidChangeTextEditorOptions.fire({ this._onDidChangeTextEditorOptions.fire({
textEditor: textEditor, textEditor: textEditor,
options: data.options options: { ...data.options, lineNumbers: TypeConverters.TextEditorLineNumbersStyle.to(data.options.lineNumbers) }
}); });
} }
if (data.selections) { if (data.selections) {
......
...@@ -29,6 +29,7 @@ import { parse } from 'vs/base/common/marshalling'; ...@@ -29,6 +29,7 @@ import { parse } from 'vs/base/common/marshalling';
import { cloneAndChange } from 'vs/base/common/objects'; import { cloneAndChange } from 'vs/base/common/objects';
import { LogLevel as _MainLogLevel } from 'vs/platform/log/common/log'; import { LogLevel as _MainLogLevel } from 'vs/platform/log/common/log';
import { coalesce } from 'vs/base/common/arrays'; import { coalesce } from 'vs/base/common/arrays';
import { RenderLineNumbersType } from 'vs/editor/common/config/editorOptions';
export interface PositionLike { export interface PositionLike {
line: number; line: number;
...@@ -883,6 +884,31 @@ export namespace TextDocumentSaveReason { ...@@ -883,6 +884,31 @@ export namespace TextDocumentSaveReason {
} }
} }
export namespace TextEditorLineNumbersStyle {
export function from(style: vscode.TextEditorLineNumbersStyle): RenderLineNumbersType {
switch (style) {
case types.TextEditorLineNumbersStyle.Off:
return RenderLineNumbersType.Off;
case types.TextEditorLineNumbersStyle.Relative:
return RenderLineNumbersType.Relative;
case types.TextEditorLineNumbersStyle.On:
default:
return RenderLineNumbersType.On;
}
}
export function to(style: RenderLineNumbersType): vscode.TextEditorLineNumbersStyle {
switch (style) {
case RenderLineNumbersType.Off:
return types.TextEditorLineNumbersStyle.Off;
case RenderLineNumbersType.Relative:
return types.TextEditorLineNumbersStyle.Relative;
case RenderLineNumbersType.On:
default:
return types.TextEditorLineNumbersStyle.On;
}
}
}
export namespace EndOfLine { export namespace EndOfLine {
export function from(eol: vscode.EndOfLine): EndOfLineSequence | undefined { export function from(eol: vscode.EndOfLine): EndOfLineSequence | undefined {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as assert from 'assert'; import * as assert from 'assert';
import { TextEditorLineNumbersStyle, Range } from 'vs/workbench/api/node/extHostTypes'; import { TextEditorLineNumbersStyle, Range } from 'vs/workbench/api/node/extHostTypes';
import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; import { TextEditorCursorStyle, RenderLineNumbersType } from 'vs/editor/common/config/editorOptions';
import { MainThreadTextEditorsShape, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate } from 'vs/workbench/api/node/extHost.protocol'; import { MainThreadTextEditorsShape, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate } from 'vs/workbench/api/node/extHost.protocol';
import { ExtHostTextEditorOptions, ExtHostTextEditor } from 'vs/workbench/api/node/extHostTextEditor'; import { ExtHostTextEditorOptions, ExtHostTextEditor } from 'vs/workbench/api/node/extHostTextEditor';
import { ExtHostDocumentData } from 'vs/workbench/api/node/extHostDocumentData'; import { ExtHostDocumentData } from 'vs/workbench/api/node/extHostDocumentData';
...@@ -91,7 +91,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -91,7 +91,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
}); });
...@@ -118,7 +118,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -118,7 +118,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -130,7 +130,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -130,7 +130,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ tabSize: 1 }]); assert.deepEqual(calls, [{ tabSize: 1 }]);
}); });
...@@ -142,7 +142,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -142,7 +142,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ tabSize: 2 }]); assert.deepEqual(calls, [{ tabSize: 2 }]);
}); });
...@@ -154,7 +154,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -154,7 +154,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ tabSize: 2 }]); assert.deepEqual(calls, [{ tabSize: 2 }]);
}); });
...@@ -166,7 +166,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -166,7 +166,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ tabSize: 'auto' }]); assert.deepEqual(calls, [{ tabSize: 'auto' }]);
}); });
...@@ -178,7 +178,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -178,7 +178,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -190,7 +190,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -190,7 +190,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -202,7 +202,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -202,7 +202,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -214,7 +214,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -214,7 +214,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -226,7 +226,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -226,7 +226,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -238,7 +238,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -238,7 +238,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 1, indentSize: 1,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ indentSize: 1 }]); assert.deepEqual(calls, [{ indentSize: 1 }]);
}); });
...@@ -250,7 +250,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -250,7 +250,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 2, indentSize: 2,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ indentSize: 2 }]); assert.deepEqual(calls, [{ indentSize: 2 }]);
}); });
...@@ -262,7 +262,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -262,7 +262,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 2, indentSize: 2,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ indentSize: 2 }]); assert.deepEqual(calls, [{ indentSize: 2 }]);
}); });
...@@ -274,7 +274,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -274,7 +274,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ indentSize: 'tabSize' }]); assert.deepEqual(calls, [{ indentSize: 'tabSize' }]);
}); });
...@@ -286,7 +286,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -286,7 +286,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -298,7 +298,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -298,7 +298,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -310,7 +310,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -310,7 +310,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -322,7 +322,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -322,7 +322,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -334,7 +334,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -334,7 +334,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -346,7 +346,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -346,7 +346,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -358,7 +358,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -358,7 +358,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: true, insertSpaces: true,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ insertSpaces: true }]); assert.deepEqual(calls, [{ insertSpaces: true }]);
}); });
...@@ -370,7 +370,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -370,7 +370,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -382,7 +382,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -382,7 +382,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: true, insertSpaces: true,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ insertSpaces: true }]); assert.deepEqual(calls, [{ insertSpaces: true }]);
}); });
...@@ -394,7 +394,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -394,7 +394,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ insertSpaces: 'auto' }]); assert.deepEqual(calls, [{ insertSpaces: 'auto' }]);
}); });
...@@ -406,7 +406,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -406,7 +406,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -418,7 +418,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -418,7 +418,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Block, cursorStyle: TextEditorCursorStyle.Block,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ cursorStyle: TextEditorCursorStyle.Block }]); assert.deepEqual(calls, [{ cursorStyle: TextEditorCursorStyle.Block }]);
}); });
...@@ -430,7 +430,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -430,7 +430,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -442,9 +442,9 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -442,9 +442,9 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.Off lineNumbers: RenderLineNumbersType.Off
}); });
assert.deepEqual(calls, [{ lineNumbers: TextEditorLineNumbersStyle.Off }]); assert.deepEqual(calls, [{ lineNumbers: RenderLineNumbersType.Off }]);
}); });
test('can do bulk updates 0', () => { test('can do bulk updates 0', () => {
...@@ -459,7 +459,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -459,7 +459,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, []); assert.deepEqual(calls, []);
}); });
...@@ -474,7 +474,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -474,7 +474,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: true, insertSpaces: true,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ tabSize: 'auto', insertSpaces: true }]); assert.deepEqual(calls, [{ tabSize: 'auto', insertSpaces: true }]);
}); });
...@@ -489,7 +489,7 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -489,7 +489,7 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Line, cursorStyle: TextEditorCursorStyle.Line,
lineNumbers: TextEditorLineNumbersStyle.On lineNumbers: RenderLineNumbersType.On
}); });
assert.deepEqual(calls, [{ tabSize: 3, insertSpaces: 'auto' }]); assert.deepEqual(calls, [{ tabSize: 3, insertSpaces: 'auto' }]);
}); });
...@@ -504,9 +504,9 @@ suite('ExtHostTextEditorOptions', () => { ...@@ -504,9 +504,9 @@ suite('ExtHostTextEditorOptions', () => {
indentSize: 4, indentSize: 4,
insertSpaces: false, insertSpaces: false,
cursorStyle: TextEditorCursorStyle.Block, cursorStyle: TextEditorCursorStyle.Block,
lineNumbers: TextEditorLineNumbersStyle.Relative lineNumbers: RenderLineNumbersType.Relative
}); });
assert.deepEqual(calls, [{ cursorStyle: TextEditorCursorStyle.Block, lineNumbers: TextEditorLineNumbersStyle.Relative }]); assert.deepEqual(calls, [{ cursorStyle: TextEditorCursorStyle.Block, lineNumbers: RenderLineNumbersType.Relative }]);
}); });
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册