import * as vscode from 'vscode' ; import { ABL_MODE } from '../ablMode' ; import { ABLDocumentController , getDocumentController } from '../parser/documentController' ; export class ABLSymbolProvider implements vscode . DocumentSymbolProvider { private _ablDocumentController : ABLDocumentController ; constructor ( context ) { this . _ablDocumentController = getDocumentController ( ) ; context . subscriptions . push ( vscode . languages . registerDocumentSymbolProvider ( ABL_MODE . language , this ) ) ; } public provideDocumentSymbols ( document , token ) { return Promise . resolve ( this . _ablDocumentController . getDocument ( document ) . symbols ) ; } }