mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
add SymbolInformation.tags, render deprecated items in quick outline and workspace symbol search
This commit is contained in:
@@ -70,8 +70,8 @@ class DocumentSymbolAdapter {
|
||||
const element = <modes.DocumentSymbol>{
|
||||
name: info.name || '!!MISSING: name!!',
|
||||
kind: typeConvert.SymbolKind.from(info.kind),
|
||||
tags: [],
|
||||
detail: undefined!, // Strict null override — avoid changing behavior
|
||||
tags: info.tags && info.tags.map(typeConvert.SymbolTag.from),
|
||||
detail: '',
|
||||
containerName: info.containerName,
|
||||
range: typeConvert.Range.from(info.location.range),
|
||||
selectionRange: typeConvert.Range.from(info.location.range),
|
||||
|
||||
@@ -576,17 +576,20 @@ export namespace WorkspaceSymbol {
|
||||
return <search.IWorkspaceSymbol>{
|
||||
name: info.name,
|
||||
kind: SymbolKind.from(info.kind),
|
||||
tags: info.tags && info.tags.map(SymbolTag.from),
|
||||
containerName: info.containerName,
|
||||
location: location.from(info.location)
|
||||
};
|
||||
}
|
||||
export function to(info: search.IWorkspaceSymbol): types.SymbolInformation {
|
||||
return new types.SymbolInformation(
|
||||
const result = new types.SymbolInformation(
|
||||
info.name,
|
||||
SymbolKind.to(info.kind),
|
||||
info.containerName,
|
||||
location.to(info.location)
|
||||
);
|
||||
result.tags = info.tags && info.tags.map(SymbolTag.to);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -995,6 +995,7 @@ export class SymbolInformation {
|
||||
name: string;
|
||||
location!: Location;
|
||||
kind: SymbolKind;
|
||||
tags?: SymbolTag[];
|
||||
containerName: string | undefined;
|
||||
|
||||
constructor(name: string, kind: SymbolKind, containerName: string | undefined, location: Location);
|
||||
|
||||
Reference in New Issue
Block a user