vscode#StatusBarItem TypeScript Examples

The following examples show how to use vscode#StatusBarItem. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: spIndex.ts    From sourcepawn-vscode with MIT License 6 votes vote down vote up
async function loadFiles(providers: Providers, SBItem: StatusBarItem) {
  await parseSMApi(providers.itemsRepository);

  const mainPath = findMainPath();
  if (mainPath !== undefined) {
    if (!checkMainPath(mainPath)) {
      window.showErrorMessage(
        "A setting for the main.sp file was specified, but seems invalid. Right click on a file and use the command at the bottom of the menu to set it as main."
      );
    } else {
      providers.itemsRepository.handleDocumentOpening(mainPath);
    }
  }

  // Load the currently opened file
  if (window.activeTextEditor != undefined) {
    providers.itemsRepository.handleDocumentOpening(
      window.activeTextEditor.document.uri.fsPath
    );
  }
  updateDecorations(providers.itemsRepository);

  SBItem.hide();
}
Example #2
Source File: vscode-control.ts    From vs-code-conan with MIT License 6 votes vote down vote up
private static updateProfile(state: AppState, barItems: StatusBarItems, activeProfileStatusBarItem: StatusBarItem) {
        activeProfileStatusBarItem.text = state.activeProfile;
        activeProfileStatusBarItem.show();
        if (isWorkspace(state.activeProfile)) {
            barItems.install.show();
            barItems.install.tooltip = "Run conan workspace install";
            barItems.build.hide();
            barItems.create.hide();
        }
        else {
            barItems.install.show();
            if (state.activeProfile === ALL) {
                barItems.install.tooltip = "Run conan install / conan workspace install";
            } else {
                barItems.install.tooltip = "Run conan install";
            }
            barItems.build.show();
            barItems.create.show();
        }

        function isWorkspace(activeProfile: string) {
            let onlyHasWorkspaces: boolean = state.config.isWorkspace(activeProfile);
            if (activeProfile === ALL) {
                onlyHasWorkspaces = true;
                for (let currentProfile of state.profiles) {
                    if (!state.config.isWorkspace(currentProfile) && currentProfile !== ALL) {
                        onlyHasWorkspaces = false;
                        break;
                    }
                }
            }
            return onlyHasWorkspaces;
        }
    }
Example #3
Source File: status-bar.ts    From vscode-cadence with Apache License 2.0 6 votes vote down vote up
export function updateActiveAccountStatusBarItem (statusBarItem: StatusBarItem, activeAccount: Account | null): void {
  if (activeAccount == null) {
    statusBarItem.hide()
    return
  }

  statusBarItem.text = `$(key) Active account: ${activeAccount.fullName()}`
  statusBarItem.show()
}
Example #4
Source File: status-bar.ts    From vscode-cadence with Apache License 2.0 6 votes vote down vote up
export function updateEmulatorStatusBarItem (statusBarItem: StatusBarItem, emulatorState: EmulatorState): void {
  switch (emulatorState) {
    case EmulatorState.Stopped:
      statusBarItem.command = START_EMULATOR
      statusBarItem.text = '$(debug-start) Start Flow Emulator'
      break
    case EmulatorState.Starting:
      statusBarItem.command = undefined
      statusBarItem.text = '$(loading~spin) Emulator starting...'
      break
    case EmulatorState.Started:
      statusBarItem.command = STOP_EMULATOR
      statusBarItem.text = '$(debug-stop) Stop Flow Emulator'
      break
  }

  statusBarItem.show()
}
Example #5
Source File: extension.ts    From vscode-cadence with Apache License 2.0 6 votes vote down vote up
constructor (
    config: Config,
    ctx: ExtensionContext,
    api: LanguageServerAPI,
    terminal: Terminal,
    emulatorStatusBarItem: StatusBarItem,
    activeAccountStatusBarItem: StatusBarItem
  ) {
    this.config = config
    this.ctx = ctx
    this.api = api
    this.terminal = terminal
    this.emulatorStatusBarItem = emulatorStatusBarItem
    this.activeAccountStatusBarItem = activeAccountStatusBarItem
  }
Example #6
Source File: AuthorizationStatusBar.ts    From al-objid with MIT License 5 votes vote down vote up
private _status: StatusBarItem;
Example #7
Source File: coverage.ts    From gnucobol-debug with GNU General Public License v3.0 5 votes vote down vote up
private statusBar: StatusBarItem = window.createStatusBarItem(StatusBarAlignment.Right, 100);
Example #8
Source File: statusBar.ts    From vscode-todo-md with MIT License 5 votes vote down vote up
protected statusBarItem!: StatusBarItem;
Example #9
Source File: client.ts    From vscode-discord with MIT License 5 votes vote down vote up
public statusBar: StatusBarItem;
Example #10
Source File: status-bar.ts    From vscode-cadence with Apache License 2.0 5 votes vote down vote up
export function createActiveAccountStatusBarItem (): StatusBarItem {
  const statusBarItem = window.createStatusBarItem(StatusBarAlignment.Left, 100)
  statusBarItem.command = SWITCH_ACCOUNT
  return statusBarItem
}
Example #11
Source File: status-bar.ts    From vscode-cadence with Apache License 2.0 5 votes vote down vote up
export function createEmulatorStatusBarItem (): StatusBarItem {
  return window.createStatusBarItem(StatusBarAlignment.Left, 200)
}
Example #12
Source File: extension.ts    From vscode-cadence with Apache License 2.0 5 votes vote down vote up
activeAccountStatusBarItem: StatusBarItem
Example #13
Source File: extension.ts    From vscode-cadence with Apache License 2.0 5 votes vote down vote up
emulatorStatusBarItem: StatusBarItem
Example #14
Source File: q-status-bar-manager.ts    From vscode-q with MIT License 5 votes vote down vote up
private queryModeStatusBar: StatusBarItem;
Example #15
Source File: q-status-bar-manager.ts    From vscode-q with MIT License 5 votes vote down vote up
private unlimitedQueryStatusBar: StatusBarItem;
Example #16
Source File: q-status-bar-manager.ts    From vscode-q with MIT License 5 votes vote down vote up
private queryStatusBar: StatusBarItem;
Example #17
Source File: q-status-bar-manager.ts    From vscode-q with MIT License 5 votes vote down vote up
private connStatusBar: StatusBarItem;
Example #18
Source File: versionStatusBar.ts    From vscode-dbt-power-user with MIT License 5 votes vote down vote up
readonly statusBar: StatusBarItem = window.createStatusBarItem(
    StatusBarAlignment.Left,
    10
  );
Example #19
Source File: status.ts    From vscode-stories with MIT License 5 votes vote down vote up
private item: StatusBarItem;
Example #20
Source File: compilationStatusView.ts    From ide-vscode with MIT License 5 votes vote down vote up
private constructor(private readonly statusBarItem: StatusBarItem) {}
Example #21
Source File: SnippetStatus.ts    From vsinder with Apache License 2.0 5 votes vote down vote up
private item: StatusBarItem;
Example #22
Source File: extension.ts    From plugin-vscode with Apache License 2.0 5 votes vote down vote up
private sdkVersion: StatusBarItem;