src/languageTools/ClientLoader.js
function initDomainAndHandleNodeCrash() {
        clientInfoDomain = new NodeDomain("LanguageClientInfo", _domainPath);
        //Initialize LanguageClientInfo once the domain has successfully loaded.
        clientInfoDomain.promise().done(function () {
            sendLanguageClientInfo();
            //This is to handle the node failure. If the node process dies, we get an on close
            //event on the websocket connection object. Brackets then spawns another process and
            //restablishes the connection. Once the connection is restablished we send reinitialize
            //the LanguageClient info.
            clientInfoDomain.connection.on("close", function (event, reconnectedPromise) {
                reconnectedPromise.done(sendLanguageClientInfo);
            });
        }).fail(function (err) {
            console.error("ClientInfo domain could not be loaded: ", err);
        });
    }
function initDomainAndHandleNodeCrash() {
        clientInfoDomain = new NodeDomain("LanguageClientInfo", _domainPath);
        //Initialize LanguageClientInfo once the domain has successfully loaded.
        clientInfoDomain.promise().done(function () {
            sendLanguageClientInfo();
            //This is to handle the node failure. If the node process dies, we get an on close
            //event on the websocket connection object. Brackets then spawns another process and
            //restablishes the connection. Once the connection is restablished we send reinitialize
            //the LanguageClient info.
            clientInfoDomain.connection.on("close", function (event, reconnectedPromise) {
                reconnectedPromise.done(sendLanguageClientInfo);
            });
        }).fail(function (err) {
            console.error("ClientInfo domain could not be loaded: ", err);
        });
    }
function initDomainAndHandleNodeCrash ( ) { clientInfoDomain = new NodeDomain ( "LanguageClientInfo" , _domainPath ) ; //Initialize LanguageClientInfo once the domain has successfully loaded. clientInfoDomain . promise ( ) . done ( function ( ) { sendLanguageClientInfo ( ) ; //This is to handle the node failure. If the node process dies, we get an on close //event on the websocket connection object. Brackets then spawns another process and //restablishes the connection. Once the connection is restablished we send reinitialize //the LanguageClient info. clientInfoDomain . connection . on ( "close" , function ( event , reconnectedPromise ) { reconnectedPromise . done ( sendLanguageClientInfo ) ; } ) ; } ) . fail ( function ( err ) { console . error ( "ClientInfo domain could not be loaded: " , err ) ; } ) ; }
This function starts a domain which initializes the LanguageClient node module
required by the Language Server Protocol framework in Brackets. All the LSP clients
can only be successfully initiated once this domain has been successfully loaded and
the LanguageClient info initialized. Refer to sendLanguageClientInfo for more.
This function starts a domain which initializes the LanguageClient node module required by the Language Server Protocol framework in Brackets . All the LSP clients can only be successfully initiated once this domain has been successfully loaded and the LanguageClient info initialized . Refer to sendLanguageClientInfo for more .