mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
commands: executeDocumentSymbolProvider
This commit is contained in:
@@ -72,20 +72,10 @@ class OutlineAdapter implements IOutlineSupport {
|
||||
let doc = this._documents.getDocument(resource);
|
||||
return asWinJsPromise(token => this._provider.provideDocumentSymbols(doc, token)).then(value => {
|
||||
if (Array.isArray(value)) {
|
||||
return value.map(OutlineAdapter._convertSymbolInfo);
|
||||
return value.map(TypeConverters.SymbolInformation.toOutlineEntry);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static _convertSymbolInfo(symbol: vscode.SymbolInformation): IOutlineEntry {
|
||||
return <IOutlineEntry>{
|
||||
type: TypeConverters.fromSymbolKind(symbol.kind),
|
||||
range: TypeConverters.fromRange(symbol.location.range),
|
||||
containerLabel: symbol.containerName,
|
||||
label: symbol.name,
|
||||
icon: undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class CodeLensAdapter implements modes.ICodeLensSupport {
|
||||
|
||||
Reference in New Issue
Block a user