How to use the atom-languageclient.DownloadFile function in atom-languageclient

To help you get started, we’ve selected a few atom-languageclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atom / ide-php / lib / main.js View on Github external
      .then(() => DownloadFile(serverDownloadUrl, localFileName, (bytesDone, percent) => installSignal && installSignal.setTitle(`downloading ${Math.floor(serverDownloadSize / bytesToMegabytes)} MB (${percent}% done)`), serverDownloadSize))
      .then(() => installSignal && installSignal.setTitle('unpacking...'))
github crystal-lang-tools / atom-ide-crystal / src / main.ts View on Github external
this.logger.log(`Downloading ${url} to ${localFileName}`);

    const serverHomeExists = await this.fileExists(serverHome);
    if (!serverHomeExists) {
      new Promise((resolve, reject) => {
        fs.mkdir(serverHome, err => {
          if (err) {
            return reject(err);
          }

          return resolve();
        });
      });
    }

    await DownloadFile(url, localFileName, (bytesDone, percent) =>
      this.updateStatusBar(`downloading ${percent}%`)
    );
    this.updateStatusBar("unpacking");
    await decompress(localFileName, serverHome);

    const serverBinExists = await this.fileExists(
      path.join(serverHome, "bin", process.platform, serverBinary)
    );
    if (!serverBinExists) {
      throw Error(
        `Failed to install the ${this.getServerName()} language server`
      );
    }

    this.updateStatusBar("installed");
    await new Promise((resolve, reject) => {
github spring-projects / sts4 / atom-extensions / atom-commons / lib / java-process-language-client.js View on Github external
                .then((size) => DownloadFile(this.serverDownloadUrl, localFileName, (bytesDone, percent) => this.handleDownlaodPercentChange(bytesDone, size, percent), size))
                .then(() => this.fileExists(this.getServerJar()))
github atom / ide-java / lib / main.js View on Github external
      .then(() => DownloadFile(serverDownloadUrl, localFileName, provideInstallStatus, serverDownloadSize))
      .then(() => this.updateInstallStatus('unpacking'))