Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TreeView<T>

Represents a Tree view

Type parameters

  • T

Hierarchy

Index

Methods(2)

dispose

  • dispose(): any

reveal

  • reveal(element: T, options?: { select?: boolean; focus?: boolean; expand?: number | boolean }): Thenable<void>
  • Reveals the given element in the tree view. If the tree view is not visible then the tree view is shown and element is revealed.

    By default revealed element is selected. In order to not to select, set the option select to false. In order to focus, set the option focus to true. In order to expand the revealed element, set the option expand to true. To expand recursively set expand to the number of levels to expand.

    Parameters

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

        If true, then the element will be selected.

      • Optional focus?: boolean

        If true, then the element will be focused.

      • Optional expand?: number | boolean

        If true, then the element will be expanded. If a number is passed, then up to that number of levels of children will be expanded

    Returns Thenable<void>

Properties(11)

Readonly onDidExpandElement

onDidExpandElement: Event<TreeViewExpansionEvent<T>>

Event that is fired when an element is expanded

Readonly onDidCollapseElement

onDidCollapseElement: Event<TreeViewExpansionEvent<T>>

Event that is fired when an element is collapsed

Readonly selection

selection: readonly T[]

Currently selected elements.

Readonly onDidChangeSelection

onDidChangeSelection: Event<TreeViewSelectionChangeEvent<T>>

Event that is fired when the selection has changed

Readonly visible

visible: boolean

true if the tree view is visible otherwise false.

Readonly onDidChangeVisibility

onDidChangeVisibility: Event<TreeViewVisibilityChangeEvent>

Event that is fired when visibility has changed

Readonly onDidChangeCheckboxState

onDidChangeCheckboxState: Event<TreeCheckboxChangeEvent<T>>

An event to signal that an element or root has either been checked or unchecked.

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.

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.

Optional description

description: string

An optional human-readable description which is rendered less prominently in the title of the view. Setting the title description to null, undefined, or empty string will remove the description from the view.

Optional badge

badge: ViewBadge

The badge to display for this TreeView. To remove the badge, set to undefined.

Generated by TypeDoc. Maintained by 紫升

Links: 搜外友链, 69中文网