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.
-
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)