Skip to content

HuaweiIDE/codearts-example-view-title-actions

Repository files navigation

codearts-example-view-title-action README

Features

This example demonstrates how to use the registerViewTitleActions API. This includes:

  • Register actions in the header of the editing area.
  • Registering actions in the header of the view container.
  • Register actions in the view header.

APIs

  • codearts.ui.actionViewItem.create(options)

    const action = {
        id: 'eye',
        label: 'eye',
        class: 'codicon codicon-eye',
        enabled: true,
        tooltip: 'eye',
        order: 1
    }
    
    const actionViewItem = await codearts.ui.actionViewItem.create(action);
    
    actionViewItem.onClick(() => {
        codearts.window.showInformationMessage('Hello Codearts!');
    })
  • codearts.window.registerViewTitleActions

    codearts.window.registerViewTitleActions({ viewContainerId: codearts.ViewContainerId.OUTPUT },  actionViewItem)

Effect

image

About

Example of register view title action

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published