diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index f4cf361cd18..647ca26252a 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -47,7 +47,7 @@ declare module 'vscode' { export class SelectionRange { kind: SelectionRangeKind; range: Range; - constructor(kind: SelectionRangeKind, range: Range); + constructor(range: Range, kind: SelectionRangeKind); } export interface SelectionRangeProvider { diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts index 6a0e7d9f7f1..49059e84543 100644 --- a/src/vs/workbench/api/node/extHostTypeConverters.ts +++ b/src/vs/workbench/api/node/extHostTypeConverters.ts @@ -855,7 +855,7 @@ export namespace SelectionRange { } export function to(obj: modes.SelectionRange): vscode.SelectionRange { - return new types.SelectionRange(SelectionRangeKind.to(obj.kind), Range.to(obj.range)); + return new types.SelectionRange(Range.to(obj.range), SelectionRangeKind.to(obj.kind)); } } diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index ba390e1ff49..12117cefb87 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1060,9 +1060,9 @@ export class SelectionRange { kind: SelectionRangeKind; range: Range; - constructor(kind: SelectionRangeKind, range: Range) { - this.kind = kind; + constructor(range: Range, kind: SelectionRangeKind, ) { this.range = range; + this.kind = kind; } } diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index f73279a7c6f..83cbe12ea65 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -802,8 +802,8 @@ suite('ExtHostLanguageFeatureCommands', function () { disposables.push(extHost.registerSelectionRangeProvider(nullExtensionDescription, defaultSelector, { provideSelectionRanges() { return [ - new types.SelectionRange(types.SelectionRangeKind.Empty, new types.Range(0, 10, 0, 18)), - new types.SelectionRange(types.SelectionRangeKind.Empty, new types.Range(0, 2, 0, 20)) + new types.SelectionRange(new types.Range(0, 10, 0, 18), types.SelectionRangeKind.Empty), + new types.SelectionRange(new types.Range(0, 2, 0, 20), types.SelectionRangeKind.Empty) ]; } })); diff --git a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts index daad32a2850..66c740fbaa3 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts @@ -1230,8 +1230,8 @@ suite('ExtHostLanguageFeatures', function () { disposables.push(extHost.registerSelectionRangeProvider(defaultExtension, defaultSelector, { provideSelectionRanges() { return [ - new types.SelectionRange(types.SelectionRangeKind.Empty, new types.Range(0, 10, 0, 18)), - new types.SelectionRange(types.SelectionRangeKind.Empty, new types.Range(0, 2, 0, 20)) + new types.SelectionRange(new types.Range(0, 10, 0, 18), types.SelectionRangeKind.Empty), + new types.SelectionRange(new types.Range(0, 2, 0, 20), types.SelectionRangeKind.Empty) ]; } }));