Skip to main content

Interface: StatusBarItem

Defined in: packages/extension-api/src/extension-api.d.ts:1728

A status bar item is a status bar contribution that can show text and icons and run a command on click.

Properties

alignment

readonly alignment: StatusBarAlignment

Defined in: packages/extension-api/src/extension-api.d.ts:1732

The alignment of this item.


command?

optional command: string

Defined in: packages/extension-api/src/extension-api.d.ts:1760

The identifier of a command, previously registered with commands.registerCommand, to run on click.


commandArgs?

optional commandArgs: any[]

Defined in: packages/extension-api/src/extension-api.d.ts:1765

Arguments that the command handler should be invoked with.


enabled

enabled: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:1756

Marks an item as disabled. When property is set to true, then icon will be changed to inactive and there won't be possible to execute a command if it is provided in the following configuration.


iconClass?

optional iconClass: string | { active: string; inactive: string; }

Defined in: packages/extension-api/src/extension-api.d.ts:1751

Icon class that is used to display the particular icon from the Font Awesome icon set. Icon class should be in format e.g. 'fa fa-toggle-on'. It is possible to provide an icons for state which can be enabled or disabled.


priority

readonly priority: number

Defined in: packages/extension-api/src/extension-api.d.ts:1737

The priority of this item. Higher value means the item should be shown more to the left or more to the right.


text?

optional text: string

Defined in: packages/extension-api/src/extension-api.d.ts:1741

The text to show for the entry.


tooltip?

optional tooltip: string

Defined in: packages/extension-api/src/extension-api.d.ts:1745

The tooltip text when you hover over this entry.

Methods

dispose()

dispose(): void

Defined in: packages/extension-api/src/extension-api.d.ts:1779

Dispose and free associated resources. Call StatusBarItem.hide.

Returns

void


hide()

hide(): void

Defined in: packages/extension-api/src/extension-api.d.ts:1773

Hides the entry in the status bar.

Returns

void


show()

show(): void

Defined in: packages/extension-api/src/extension-api.d.ts:1769

Shows the entry in the status bar.

Returns

void