import * as vscode from 'vscode' ; import { Disposable , ExtensionContext } from "vscode" ; import { ViewManager } from "../common/viewManager" ; import ConnectionProvider from "../node/connectionProvider" ; import { FileManager } from './fileManager' ; export default class ServiceManager { public static context : ExtensionContext ; public provider : ConnectionProvider ; private isInit = false ; constructor ( private context ) { ServiceManager . context = context ; ViewManager . initExtesnsionPath ( context . extensionPath ) ; FileManager . init ( context ) ; } public init ( ) { if ( this . isInit ) return [ ] ; const res = [ ] ; this . provider = new ConnectionProvider ( this . context ) ; const treeview = vscode . window . createTreeView ( "github.cweijan.ssh" , { treeDataProvider : this . provider } ) ; res . push ( treeview ) ; this . isInit = true ; return res ; } }