Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TreeView<T>

Represents a Tree view

Type parameters

  • T

Hierarchy

Index

Properties

Optional description

description: string

An optional human-readable subheading that will be rendered next to the main title. Setting the description to null, undefined, or empty string will remove the message from the view.

Optional message

message: string

An optional human-readable message that will be rendered in the view. Setting the message to null, undefined, or empty string will remove the message from the view.

Readonly onDidChangeSelection

onDidChangeSelection: Event<TreeViewSelectionChangeEvent<T>>

Event that is fired when the selection has changed

Readonly onDidChangeVisibility

onDidChangeVisibility: Event<TreeViewVisibilityChangeEvent>

Event that is fired when visibility has changed

Readonly onDidCollapseElement

onDidCollapseElement: Event<TreeViewExpansionEvent<T>>

Event that is fired when an element is collapsed

Readonly onDidExpandElement

onDidExpandElement: Event<TreeViewExpansionEvent<T>>

Event that is fired when an element is expanded

Readonly selection

selection: readonly T[]

Currently selected elements.

Optional title

title: string

The tree view title is initially taken from the extension package.json Changes to the title property will be properly reflected in the UI in the title of the view.

Readonly visible

visible: boolean

true if the tree view is visible otherwise false.

Methods

dispose

  • dispose(): void

reveal

  • reveal(element: T, options?: { expand?: number | boolean; focus?: boolean; select?: boolean }): PromiseLike<void>
  • Reveal an element. By default revealed element is selected.

    In order to not to select, set the option select to false.

    NOTE: TreeDataProvider is required to implement getParent method to access this API.

    Parameters

    • element: T
    • Optional options: { expand?: number | boolean; focus?: boolean; select?: boolean }
      • Optional expand?: number | boolean
      • Optional focus?: boolean
      • Optional select?: boolean

    Returns PromiseLike<void>