message: eng/dep-manager: Indicator status bar
diff: -import { window as Win, workspace, ConfigurationTarget } from 'vscode';
  +import { window as Win, workspace, ConfigurationTarget, window, StatusBarAlignment, StatusBarItem } from 'vscode';
  import { InstallDepRequest, MissingModuleNotification, ElectronNotSupportedNotification, DependeciesAreBeingInstalledNotification } from '@sqltools/plugins/dependency-manager/contracts';
  import SQLTools from '@sqltools/core/plugin-api';
  import { ConnectRequest } from '@sqltools/plugins/connection-manager/contracts';
  import { openExternal } from '@sqltools/core/utils/vscode';
  import { EXT_NAME, DOCS_ROOT_URL } from '@sqltools/core/constants';
  +import ConfigManager from '@sqltools/core/config-manager';
  export default class DependencyManager implements SQLTools.ExtensionPlugin {
  public client: SQLTools.LanguageClientInterface;
  @@ -22,6 +23,8 @@ export default class DependencyManager implements SQLTools.ExtensionPlugin {
  if (!r) return;
  return workspace.getConfiguration(EXT_NAME.toLowerCase()).update('useNodeRuntime', true, ConfigurationTarget.Global);
  }
  +
  + private installingDialects: string[] = [];
  private requestToInstall = async ({ moduleName, moduleVersion, conn }) => {
  const installNow = 'Install now';
  const readMore = 'Read more';
  @@ -33,7 +36,10 @@ export default class DependencyManager implements SQLTools.ExtensionPlugin {
  );
  switch (r) {
  case installNow:
  + this.installingDialects.push(conn.dialect);
  + this.updateStatusBar();
  await this.client.sendRequest(InstallDepRequest, { dialect: conn.dialect });
  + this.installingDialects = this.installingDialects.filter(v => v !== conn.dialect);
  const opt = [`Connect to ${conn.name}`];
  const rr = await Win.showInformationMessage(
  `"${moduleName}@${moduleVersion}" installed!\n
  @@ -49,6 +55,7 @@ Go ahead and connect!`,
  break;
  }
  } catch (error) {
  + this.installingDialects = this.installingDialects.filter(v => v !== conn.dialect);
  Win.showErrorMessage(error && error.message ? error.message : error.toString());
  }
  }
  @@ -56,4 +63,28 @@ Go ahead and connect!`,
  private jobRunning = async ({ moduleName, moduleVersion, conn }) => {
  return Win.showInformationMessage(`We are installing "${moduleName}@${moduleVersion}" to connect to ${conn.name}. Please wait till it finishes.`);
  }
  +
  + private statusbarProgress: StatusBarItem = null;
  + private statusbarProgressTimer = null;
  +
  + private updateStatusBar = (position = 0) => {
  + if (!this.statusbarProgress && this.installingDialects.length > 0) {
  + this.statusbarProgress = window.createStatusBarItem(StatusBarAlignment.Left, 0);
  + }
  + if (this.statusbarProgress) {
  + this.statusbarProgress.tooltip = `Installing dependencies for ${this.installingDialects.join(', ')}`
  + const chars = '\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588';
  + this.statusbarProgress.text = `Installing deps ${this.installingDialects.join(', ')} [${chars.charAt(position)}]`;
  + this.statusbarProgress.show();
  + this.statusbarProgress.color = 'cyan'
  + this.statusbarProgressTimer = this.statusbarProgressTimer || setInterval(() => this.updateStatusBar(++position % chars.length), 100);
  + }
  +
  + if (this.statusbarProgress && this.installingDialects.length === 0) {
  + this.statusbarProgress.dispose();
  + this.statusbarProgress = null;
  + clearInterval(this.statusbarProgressTimer);
  + this.statusbarProgressTimer = null;
  + }
  + }
  }
  \ No newline at end of file
  