export class MonacoUtils { static Tree : any ; static ContextSubMenu : any ; static ContextMenuService : any ; static ContextViewService : any ; static TreeDefaults : any ; static Action : any ; static async initialize ( ) { await import ( "monaco-editor" ) ; const { Action } = await import ( "monaco-editor/esm/vs/base/common/actions" ) ; const { ContextSubMenu } = await import ( "monaco-editor/esm/vs/base/browser/contextmenu" ) ; const { ContextMenuService } = await import ( "monaco-editor/esm/vs/platform/contextview/browser/contextMenuService" ) ; const { ContextViewService } = await import ( "monaco-editor/esm/vs/platform/contextview/browser/contextViewService" ) ; const { Tree } = await import ( "monaco-editor/esm/vs/base/parts/tree/browser/treeImpl" ) ; const TreeDefaults = await import ( "monaco-editor/esm/vs/base/parts/tree/browser/treeDefaults" ) ; MonacoUtils . Action = Action ; MonacoUtils . ContextSubMenu = ContextSubMenu ; MonacoUtils . ContextMenuService = ContextMenuService ; MonacoUtils . ContextViewService = ContextViewService ; MonacoUtils . Tree = Tree ; MonacoUtils . TreeDefaults = TreeDefaults ; } static expandTree ( tree ) { const model = tree . model ; const elements = [ ] ; let item ; const nav = model . getNavigator ( ) ; while ( item = nav . next ( ) ) { elements . push ( item ) ; } for ( let i = 0 , len = elements . length ; i < len ; i ++ ) { model . expand ( elements [ i ] ) ; } } }