mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
for now remove SelectionRangeKind #67872
This commit is contained in:
@@ -800,7 +800,6 @@ export function createApiFactory(
|
||||
ResolvedAuthority: extHostTypes.ResolvedAuthority,
|
||||
Selection: extHostTypes.Selection,
|
||||
SelectionRange: extHostTypes.SelectionRange,
|
||||
SelectionRangeKind: extHostTypes.SelectionRangeKind,
|
||||
ShellExecution: extHostTypes.ShellExecution,
|
||||
ShellQuoting: extHostTypes.ShellQuoting,
|
||||
SignatureHelpTriggerKind: extHostTypes.SignatureHelpTriggerKind,
|
||||
|
||||
@@ -854,27 +854,17 @@ export namespace Color {
|
||||
}
|
||||
}
|
||||
|
||||
export namespace SelectionRangeKind {
|
||||
|
||||
export function from(kind: vscode.SelectionRangeKind): string {
|
||||
return kind.value;
|
||||
}
|
||||
|
||||
export function to(value: string): vscode.SelectionRangeKind {
|
||||
return new types.SelectionRangeKind(value);
|
||||
}
|
||||
}
|
||||
|
||||
export namespace SelectionRange {
|
||||
export function from(obj: vscode.SelectionRange): modes.SelectionRange {
|
||||
return {
|
||||
kind: SelectionRangeKind.from(obj.kind),
|
||||
kind: '',
|
||||
range: Range.from(obj.range)
|
||||
};
|
||||
}
|
||||
|
||||
export function to(obj: modes.SelectionRange): vscode.SelectionRange {
|
||||
return new types.SelectionRange(Range.to(obj.range), SelectionRangeKind.to(obj.kind));
|
||||
return new types.SelectionRange(Range.to(obj.range));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1094,35 +1094,13 @@ CodeActionKind.Source = CodeActionKind.Empty.append('source');
|
||||
CodeActionKind.SourceOrganizeImports = CodeActionKind.Source.append('organizeImports');
|
||||
CodeActionKind.SourceFixAll = CodeActionKind.Source.append('fixAll');
|
||||
|
||||
@es5ClassCompat
|
||||
export class SelectionRangeKind {
|
||||
|
||||
private static readonly _sep = '.';
|
||||
|
||||
static readonly Empty = new SelectionRangeKind('');
|
||||
static readonly Statement = SelectionRangeKind.Empty.append('statement');
|
||||
static readonly Declaration = SelectionRangeKind.Empty.append('declaration');
|
||||
|
||||
readonly value: string;
|
||||
|
||||
constructor(value: string) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
append(value: string): SelectionRangeKind {
|
||||
return new SelectionRangeKind(this.value ? this.value + SelectionRangeKind._sep + value : value);
|
||||
}
|
||||
}
|
||||
|
||||
@es5ClassCompat
|
||||
export class SelectionRange {
|
||||
|
||||
kind: SelectionRangeKind;
|
||||
range: Range;
|
||||
|
||||
constructor(range: Range, kind: SelectionRangeKind, ) {
|
||||
constructor(range: Range) {
|
||||
this.range = range;
|
||||
this.kind = kind;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user