pub async fn initialize_ide_controller(&self) -> FallibleResult<controller::Ide> {
        use crate::config::BackendService::*;
        match &self.config.backend {
            ProjectManager { endpoint } => {
                let project_manager = self.setup_project_manager(endpoint).await?;
                let project_name    = self.config.project_name.clone();
                let controller      = controller::ide::Desktop::new_with_opened_project
                    (project_manager,project_name).await?;
                Ok(Rc::new(controller))
            }
            LanguageServer {json_endpoint,binary_endpoint,namespace} => {
                let json_endpoint   = json_endpoint.clone();
                let binary_endpoint = binary_endpoint.clone();
                let namespace       = namespace.clone();
                let project_name    = self.config.project_name.clone();
                // TODO[ao]: we should think how to handle engine's versions in cloud.
                //     https://github.com/enso-org/ide/issues/1195
                let version    = CONFIG.engine_version.clone();
                let controller = controller::ide::Plain::from_ls_endpoints
                    (namespace,project_name,version,json_endpoint,binary_endpoint).await?;
                Ok(Rc::new(controller))
            }
        }
    }
/// Initialize and return a new Ide Controller.
///
/// This will setup all required connections to backend properly, according to the
/// configuration.
Initialize and return a new Ide Controller.
This will setup all required connections to backend properly, according to the
configuration.
Initialize and return a new Ide Controller . This will setup all required connections to backend properly according to the configuration .
pub async fn initialize_ide_controller(&self) -> FallibleResult<controller::Ide> {
        use crate::config::BackendService::*;
        match &self.config.backend {
            ProjectManager { endpoint } => {
                let project_manager = self.setup_project_manager(endpoint).await?;
                let project_name    = self.config.project_name.clone();
                let controller      = controller::ide::Desktop::new_with_opened_project
                    (project_manager,project_name).await?;
                Ok(Rc::new(controller))
            }
            LanguageServer {json_endpoint,binary_endpoint,namespace} => {
                let json_endpoint   = json_endpoint.clone();
                let binary_endpoint = binary_endpoint.clone();
                let namespace       = namespace.clone();
                let project_name    = self.config.project_name.clone();
                // TODO[ao]: we should think how to handle engine's versions in cloud.
                //     https://github.com/enso-org/ide/issues/1195
                let version    = CONFIG.engine_version.clone();
                let controller = controller::ide::Plain::from_ls_endpoints
                    (namespace,project_name,version,json_endpoint,binary_endpoint).await?;
                Ok(Rc::new(controller))
            }
        }
    }
pub async fn initialize_ide_controller ( & self ) -> FallibleResult < controller :: Ide > { use crate :: config :: BackendService :: * ; match & self . config . backend { ProjectManager { endpoint } => { let project_manager = self . setup_project_manager ( endpoint ) . await ? ; let project_name = self . config . project_name . clone ( ) ; let controller = controller :: ide :: Desktop :: new_with_opened_project ( project_manager , project_name ) . await ? ; Ok ( Rc :: new ( controller ) ) } LanguageServer { json_endpoint , binary_endpoint , namespace } => { let json_endpoint = json_endpoint . clone ( ) ; let binary_endpoint = binary_endpoint . clone ( ) ; let namespace = namespace . clone ( ) ; let project_name = self . config . project_name . clone ( ) ; // TODO[ao]: we should think how to handle engine's versions in cloud. //     https://github.com/enso-org/ide/issues/1195 let version = CONFIG . engine_version . clone ( ) ; let controller = controller :: ide :: Plain :: from_ls_endpoints ( namespace , project_name , version , json_endpoint , binary_endpoint ) . await ? ; Ok ( Rc :: new ( controller ) ) } } }
Initialize and return a new Ide Controller.
Initialize and return a new Ide Controller .
&self
&self