Adopt monaco-editor-core@0.14.1

This commit is contained in:
Alex Dima 2018-08-10 12:53:09 +02:00
parent 0932a0bb67
commit a02a95603d
4 changed files with 37 additions and 26 deletions

View file

@ -423,7 +423,7 @@ export class DocumentSymbolAdapter implements monaco.languages.DocumentSymbolPro
constructor(private _worker: WorkerAccessor) {
}
public provideDocumentSymbols(model: monaco.editor.IReadOnlyModel, token: CancellationToken): Thenable<monaco.languages.SymbolInformation[]> {
public provideDocumentSymbols(model: monaco.editor.IReadOnlyModel, token: CancellationToken): Thenable<monaco.languages.DocumentSymbol[]> {
const resource = model.uri;
return wireCancellationToken(token, this._worker(resource).then(worker => worker.findDocumentSymbols(resource.toString())).then(items => {
@ -432,9 +432,11 @@ export class DocumentSymbolAdapter implements monaco.languages.DocumentSymbolPro
}
return items.map(item => ({
name: item.name,
detail: '',
containerName: item.containerName,
kind: toSymbolKind(item.kind),
location: toLocation(item.location)
range: toRange(item.location.range),
selectionRange: toRange(item.location.range)
}));
}));
}