Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScmTreeWidget

Hierarchy

  • TreeWidget
    • ScmTreeWidget

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new ScmTreeWidget(props: TreeProps, treeModel: TreeModel, contextMenuRenderer: ContextMenuRenderer): ScmTreeWidget

Properties

Protected Readonly colors

colors: ColorRegistry

Protected Readonly commands

commands: CommandRegistry

Protected Readonly contextKeys

Protected Readonly contextMenuRenderer

contextMenuRenderer: ContextMenuRenderer

Protected Readonly corePreferences

corePreferences: PreferenceProxy<CoreConfiguration>

Protected decorations

decorations: Map<string, Data[]>

Protected Readonly decorationsService

decorationsService: DecorationsService

Protected Readonly decoratorService

decoratorService: TreeDecoratorService

Protected Readonly diffNavigatorProvider

diffNavigatorProvider: DiffNavigatorProvider

Protected Readonly editorManager

editorManager: EditorManager

Protected Readonly handleExpansionToggleDblClickEvent

handleExpansionToggleDblClickEvent: (event: MouseEvent<HTMLElement, MouseEvent>) => void

Handle the double-click mouse event on the expansion toggle.

Type declaration

    • (event: MouseEvent<HTMLElement, MouseEvent>): void
    • Parameters

      • event: MouseEvent<HTMLElement, MouseEvent>

      Returns void

Protected Readonly handleScroll

handleScroll: (info: ScrollParams) => void

Handle the scroll event.

Type declaration

    • (info: ScrollParams): void
    • Parameters

      • info: ScrollParams

      Returns void

Protected Readonly iconThemeService

iconThemeService: IconThemeService

Protected Readonly labelProvider

labelProvider: LabelProvider

Protected lastScrollState

lastScrollState: undefined | { scrollLeft: number; scrollTop: number }

Store the last scroll state.

Protected Readonly menus

menus: MenuModelRegistry

model

Readonly onDidChangeVisibility

onDidChangeVisibility: Event<boolean>

Protected Readonly onDidChangeVisibilityEmitter

onDidChangeVisibilityEmitter: Emitter<boolean>

Readonly onDidDispose

onDidDispose: Event<void>

Protected Readonly onDidDisposeEmitter

onDidDisposeEmitter: Emitter<void>

Protected Readonly onRender

onRender: DisposableCollection

Readonly onScrollUp

onScrollUp: Event<void>

Protected Readonly onScrollUpEmitter

onScrollUpEmitter: Emitter<void>

Readonly onScrollYReachEnd

onScrollYReachEnd: Event<void>

Protected Readonly onScrollYReachEndEmitter

onScrollYReachEndEmitter: Emitter<void>

Readonly props

props: TreeProps

Protected Readonly renderNodeRow

renderNodeRow: (row: NodeRow) => ReactNode

Render the node row.

Type declaration

    • (row: NodeRow): ReactNode
    • Parameters

      • row: NodeRow

      Returns ReactNode

Protected rows

rows: Map<string, NodeRow>

scrollArea

scrollArea: Element

Protected Optional scrollBar

scrollBar: PerfectScrollbar

Protected Optional scrollOptions

scrollOptions: Options

Protected scrollToRow

scrollToRow: undefined | number

Row index to ensure visibility.

  • Used to forcefully scroll if necessary.

Protected searchBox

searchBox: SearchBox

Protected Readonly searchBoxFactory

searchBoxFactory: SearchBoxFactory

Protected searchHighlights

searchHighlights: Map<string, CaptionHighlight>

Protected Readonly selectionService

selectionService: SelectionService

Protected shouldScrollToRow

shouldScrollToRow: boolean

Protected Readonly toDispose

toDispose: DisposableCollection

Protected Readonly toDisposeOnDetach

toDisposeOnDetach: DisposableCollection

Protected Readonly toggle

toggle: (event: MouseEvent<HTMLElement, MouseEvent>) => void

Toggle the node.

Type declaration

    • (event: MouseEvent<HTMLElement, MouseEvent>): void
    • Parameters

      • event: MouseEvent<HTMLElement, MouseEvent>

      Returns void

Readonly treeModel

treeModel: TreeModel

Protected Readonly treeSearch

treeSearch: TreeSearch

Protected Readonly updateDecorations

updateDecorations: any

Update tree decorations.

  • Updating decorations are debounced in order to limit the number of expensive updates.

Protected updateRows

updateRows: any

Protected view

view: undefined | View

Static ID

ID: string = 'scm-resource-widget'

Static RESOURCE_CONTEXT_MENU

RESOURCE_CONTEXT_MENU: string[] = ...

Static RESOURCE_FOLDER_CONTEXT_MENU

RESOURCE_FOLDER_CONTEXT_MENU: string[] = ...

Static RESOURCE_FOLDER_INLINE_MENU

RESOURCE_FOLDER_INLINE_MENU: string[] = ...

Static RESOURCE_GROUP_CONTEXT_MENU

RESOURCE_GROUP_CONTEXT_MENU: string[] = ...

Static RESOURCE_GROUP_INLINE_MENU

RESOURCE_GROUP_INLINE_MENU: string[] = ...

Static RESOURCE_INLINE_MENU

RESOURCE_INLINE_MENU: string[] = ...

Accessors

viewMode

  • get viewMode(): "tree" | "list"
  • set viewMode(id: "tree" | "list"): void

Methods

Protected addClipboardListener

  • addClipboardListener<K>(element: HTMLElement, type: K, listener: EventListenerOrEventListenerObject<K>): void
  • Type parameters

    • K: "copy" | "cut" | "paste"

    Parameters

    • element: HTMLElement
    • type: K
    • listener: EventListenerOrEventListenerObject<K>

    Returns void

Protected addEventListener

  • addEventListener<K>(element: HTMLElement, type: K, listener: EventListenerOrEventListenerObject<K>, useCapture?: boolean): void
  • Type parameters

    • K: "fullscreenchange" | "fullscreenerror" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "blur" | "cancel" | "canplay" | "canplaythrough" | "change" | "click" | "close" | "contextmenu" | "cuechange" | "dblclick" | "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop" | "durationchange" | "emptied" | "ended" | "error" | "focus" | "focusin" | "focusout" | "gotpointercapture" | "input" | "invalid" | "keydown" | "keypress" | "keyup" | "load" | "loadeddata" | "loadedmetadata" | "loadstart" | "lostpointercapture" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "pause" | "play" | "playing" | "pointercancel" | "pointerdown" | "pointerenter" | "pointerleave" | "pointermove" | "pointerout" | "pointerover" | "pointerup" | "progress" | "ratechange" | "reset" | "resize" | "scroll" | "securitypolicyviolation" | "seeked" | "seeking" | "select" | "selectionchange" | "selectstart" | "stalled" | "submit" | "suspend" | "timeupdate" | "toggle" | "touchcancel" | "touchend" | "touchmove" | "touchstart" | "transitioncancel" | "transitionend" | "transitionrun" | "transitionstart" | "volumechange" | "waiting" | "wheel" | "copy" | "cut" | "paste"

    Parameters

    • element: HTMLElement
    • type: K
    • listener: EventListenerOrEventListenerObject<K>
    • Optional useCapture: boolean

    Returns void

Protected addKeyListener

  • addKeyListener<K>(element: HTMLElement, keysOrKeyCodes: Predicate | Key | KeyCode | (Key | KeyCode)[], action: (event: KeyboardEvent) => boolean | void | Object, ...additionalEventTypes: K[]): void
  • Type parameters

    • K: "fullscreenchange" | "fullscreenerror" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "blur" | "cancel" | "canplay" | "canplaythrough" | "change" | "click" | "close" | "contextmenu" | "cuechange" | "dblclick" | "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop" | "durationchange" | "emptied" | "ended" | "error" | "focus" | "focusin" | "focusout" | "gotpointercapture" | "input" | "invalid" | "keydown" | "keypress" | "keyup" | "load" | "loadeddata" | "loadedmetadata" | "loadstart" | "lostpointercapture" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "pause" | "play" | "playing" | "pointercancel" | "pointerdown" | "pointerenter" | "pointerleave" | "pointermove" | "pointerout" | "pointerover" | "pointerup" | "progress" | "ratechange" | "reset" | "resize" | "scroll" | "securitypolicyviolation" | "seeked" | "seeking" | "select" | "selectionchange" | "selectstart" | "stalled" | "submit" | "suspend" | "timeupdate" | "toggle" | "touchcancel" | "touchend" | "touchmove" | "touchstart" | "transitioncancel" | "transitionend" | "transitionrun" | "transitionstart" | "volumechange" | "waiting" | "wheel" | "copy" | "cut" | "paste"

    Parameters

    • element: HTMLElement
    • keysOrKeyCodes: Predicate | Key | KeyCode | (Key | KeyCode)[]
    • action: (event: KeyboardEvent) => boolean | void | Object
        • (event: KeyboardEvent): boolean | void | Object
        • Parameters

          • event: KeyboardEvent

          Returns boolean | void | Object

    • Rest ...additionalEventTypes: K[]

    Returns void

Protected addUpdateListener

  • addUpdateListener<K>(element: HTMLElement, type: K, useCapture?: boolean): void
  • Type parameters

    • K: "fullscreenchange" | "fullscreenerror" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "blur" | "cancel" | "canplay" | "canplaythrough" | "change" | "click" | "close" | "contextmenu" | "cuechange" | "dblclick" | "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop" | "durationchange" | "emptied" | "ended" | "error" | "focus" | "focusin" | "focusout" | "gotpointercapture" | "input" | "invalid" | "keydown" | "keypress" | "keyup" | "load" | "loadeddata" | "loadedmetadata" | "loadstart" | "lostpointercapture" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "pause" | "play" | "playing" | "pointercancel" | "pointerdown" | "pointerenter" | "pointerleave" | "pointermove" | "pointerout" | "pointerover" | "pointerup" | "progress" | "ratechange" | "reset" | "resize" | "scroll" | "securitypolicyviolation" | "seeked" | "seeking" | "select" | "selectionchange" | "selectstart" | "stalled" | "submit" | "suspend" | "timeupdate" | "toggle" | "touchcancel" | "touchend" | "touchmove" | "touchstart" | "transitioncancel" | "transitionend" | "transitionrun" | "transitionstart" | "volumechange" | "waiting" | "wheel" | "copy" | "cut" | "paste"

    Parameters

    • element: HTMLElement
    • type: K
    • Optional useCapture: boolean

    Returns void

Protected applyFontStyles

  • applyFontStyles(original: CSSProperties, fontData: undefined | FontData): CSSProperties
  • Apply font styles to the tree.

    Parameters

    • original: CSSProperties

      the original css properties.

    • fontData: undefined | FontData

      the optional fontData.

    Returns CSSProperties

clearFlag

  • clearFlag(flag: Flag): void
  • Parameters

    • flag: Flag

    Returns void

Protected createContainerAttributes

  • createContainerAttributes(): HTMLAttributes<HTMLElement>

Protected createNodeAttributes

  • createNodeAttributes(node: TreeNode, props: NodeProps): Attributes & HTMLAttributes<HTMLElement>
  • Create node attributes for the tree node given the node properties.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns Attributes & HTMLAttributes<HTMLElement>

Protected createNodeClassNames

  • createNodeClassNames(node: TreeNode, props: NodeProps): string[]
  • Create the node class names.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns string[]

    the list of tree node class names.

Protected createNodeStyle

  • createNodeStyle(node: TreeNode, props: NodeProps): undefined | CSSProperties
  • Create the tree node style.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns undefined | CSSProperties

Protected decorateCaption

  • decorateCaption(node: TreeNode, attrs: HTMLAttributes<HTMLElement>): Attributes & HTMLAttributes<HTMLElement>
  • Decorate the tree caption.

    Parameters

    • node: TreeNode

      the tree node.

    • attrs: HTMLAttributes<HTMLElement>

      the additional attributes.

    Returns Attributes & HTMLAttributes<HTMLElement>

Protected decorateIcon

  • decorateIcon(node: TreeNode, icon: ReactNode): ReactNode
  • Decorate the tree node icon.

    Parameters

    • node: TreeNode

      the tree node.

    • icon: ReactNode

      the icon.

    Returns ReactNode

Protected decorateNodeStyle

  • decorateNodeStyle(node: TreeNode, style: undefined | CSSProperties): undefined | CSSProperties
  • Decorate the node style.

    Parameters

    • node: TreeNode

      the tree node.

    • style: undefined | CSSProperties

      the optional CSS properties.

    Returns undefined | CSSProperties

    the CSS styles if available.

Protected deflateForStorage

  • deflateForStorage(node: TreeNode): object
  • Deflate the tree node for storage.

    Parameters

    • node: TreeNode

      the tree node.

    Returns object

Protected disableScrollBarFocus

  • disableScrollBarFocus(scrollContainer: HTMLElement): void
  • Parameters

    • scrollContainer: HTMLElement

    Returns void

dispose

  • dispose(): void
  • Returns void

Protected doFocus

  • doFocus(): void
  • Actually focus the tree node.

    Returns void

Protected doHandleExpansionToggleDblClickEvent

  • doHandleExpansionToggleDblClickEvent(event: MouseEvent<HTMLElement, MouseEvent>): void
  • Actually handle the double-click mouse event on the expansion toggle.

    Parameters

    • event: MouseEvent<HTMLElement, MouseEvent>

      the double-click mouse event.

    Returns void

Protected doRenderNodeRow

  • doRenderNodeRow(__namedParameters: NodeRow): ReactNode
  • Actually render the node row.

    Parameters

    • __namedParameters: NodeRow

    Returns ReactNode

Protected doToggle

  • doToggle(event: MouseEvent<HTMLElement, MouseEvent>): void
  • Actually toggle the tree node.

    Parameters

    • event: MouseEvent<HTMLElement, MouseEvent>

      the mouse click event.

    Returns void

Protected doUpdateDecorations

  • doUpdateDecorations(): Promise<void>
  • Returns Promise<void>

Protected doUpdateRows

  • doUpdateRows(): void
  • Returns void

Protected forceUpdate

  • forceUpdate(__namedParameters?: ForceUpdateOptions): void

Protected getContainerTreeNode

  • getContainerTreeNode(): undefined | TreeNode
  • Get the container tree node.

    Returns undefined | TreeNode

    the tree node for the container if available.

Protected getDecorationData

  • getDecorationData<K>(node: TreeNode, key: K): Data[K][]
  • Get the tree decoration data for the given key.

    Type parameters

    • K: "captionPrefixes" | "captionSuffixes" | "priority" | "fontData" | "backgroundColor" | "tailDecorations" | "tooltip" | "iconColor" | "iconOverlay" | "highlight" | "badge"

    Parameters

    • node: TreeNode

      the tree node.

    • key: K

      the tree decoration data key.

    Returns Data[K][]

    the tree decoration data at the given key.

Protected getDecorations

  • getDecorations(node: TreeNode): Data[]
  • Get the tree node decorations.

    Parameters

    • node: TreeNode

      the tree node.

    Returns Data[]

    the list of tree decoration data.

Protected getDefaultNodeStyle

  • getDefaultNodeStyle(node: TreeNode, props: NodeProps): undefined | CSSProperties
  • Get the default node style.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns undefined | CSSProperties

    the CSS properties if available.

Protected getFirstSelectableNode

  • getFirstSelectableNode(): undefined | SelectableTreeNode

Protected getIconClass

  • getIconClass(iconName: string | string[], additionalClasses?: string[]): string
  • Determine the classes to use for an icon

    • Assumes a Font Awesome name when passed a single string, otherwise uses the passed string array

    Parameters

    • iconName: string | string[]

      the icon name or list of icon names.

    • Optional additionalClasses: string[]

      additional CSS classes.

    Returns string

    the icon class name.

Protected getNodeToFocus

  • getNodeToFocus(): undefined | SelectableTreeNode
  • Get the tree node to focus.

    Returns undefined | SelectableTreeNode

    the node to focus if available.

Protected getPaddingLeft

  • getPaddingLeft(node: TreeNode, props: NodeProps): number

Protected getScrollContainer

  • getScrollContainer(): MaybePromise<HTMLElement>
  • Get the scroll container.

    Returns MaybePromise<HTMLElement>

Protected getScrollToRow

  • getScrollToRow(): undefined | number
  • Get the scrollToRow.

    Returns undefined | number

    the scrollToRow if available.

goToNextChange

  • goToNextChange(): Promise<void>

goToPreviousChange

  • goToPreviousChange(): Promise<void>

Protected handleClickEvent

  • handleClickEvent(node: undefined | TreeNode, event: MouseEvent<HTMLElement, MouseEvent>): void
  • Handle the single-click mouse event.

    Parameters

    • node: undefined | TreeNode

      the tree node if available.

    • event: MouseEvent<HTMLElement, MouseEvent>

      the mouse single-click event.

    Returns void

Protected handleContextMenuEvent

  • handleContextMenuEvent(node: undefined | TreeNode, event: MouseEvent<HTMLElement, MouseEvent>): void
  • Handle the context menu click event.

    • The context menu click event is triggered by the right-click.

    Parameters

    • node: undefined | TreeNode

      the tree node if available.

    • event: MouseEvent<HTMLElement, MouseEvent>

      the right-click mouse event.

    Returns void

Protected handleDblClickEvent

  • handleDblClickEvent(node: undefined | TreeNode, event: MouseEvent<HTMLElement, MouseEvent>): void
  • Handle the double-click mouse event.

    Parameters

    • node: undefined | TreeNode

      the tree node if available.

    • event: MouseEvent<HTMLElement, MouseEvent>

      the double-click mouse event.

    Returns void

Protected handleDown

  • handleDown(event: KeyboardEvent): void
  • Handle the down arrow keyboard event.

    Parameters

    • event: KeyboardEvent

      the down arrow keyboard event.

    Returns void

Protected handleEnter

  • handleEnter(event: KeyboardEvent): void

Protected handleLeft

  • handleLeft(event: KeyboardEvent): Promise<void>
  • The ARROW_LEFT key controls both the movement around the file tree and also the movement through the change chunks within a file.

    If the selected tree node is a folder then the ARROW_LEFT key behaves exactly as it does in explorer. It collapses the tree node if the folder is expanded and it moves the selection up to the parent folder if the folder is collapsed (no-op if no parent folder, as group headers are not selectable). This behavior is the default behavior implemented in the TreeWidget super class.

    If the selected tree node is a file then the ARROW_LEFT key moves up through the change chunks within each file. If the selected chunk is the first chunk in the file then the file selection is moved to the previous file (no-op if no previous file).

    Note that when cursoring through change chunks, the ARROW_LEFT key cannot be used to move up through the parent folders of the file tree. If users want to do this, using keys only, then they must press ARROW_UP repeatedly until the selected node is the folder node and then press ARROW_LEFT.

    Parameters

    • event: KeyboardEvent

    Returns Promise<void>

Protected handleRight

  • handleRight(event: KeyboardEvent): Promise<void>
  • The ARROW_RIGHT key controls both the movement around the file tree and also the movement through the change chunks within a file.

    If the selected tree node is a folder then the ARROW_RIGHT key behaves exactly as it does in explorer. It expands the tree node if the folder is collapsed and it moves the selection to the first child node if the folder is expanded. This behavior is the default behavior implemented in the TreeWidget super class.

    If the selected tree node is a file then the ARROW_RIGHT key moves down through the change chunks within each file. If the selected chunk is the last chunk in the file then the file selection is moved to the next file (no-op if no next file).

    Parameters

    • event: KeyboardEvent

    Returns Promise<void>

Protected handleUp

  • handleUp(event: KeyboardEvent): void
  • Handle the up arrow keyboard event.

    Parameters

    • event: KeyboardEvent

      the up arrow keyboard event.

    Returns void

Protected hasCtrlCmdMask

  • hasCtrlCmdMask(event: ModifierAwareEvent): boolean
  • Determine if the tree modifier aware event has a ctrlcmd mask.

    Parameters

    • event: ModifierAwareEvent

      the tree modifier aware event.

    Returns boolean

    true if the tree modifier aware event contains the ctrlcmd mask.

Protected hasShiftMask

  • hasShiftMask(event: ModifierAwareEvent): boolean
  • Determine if the tree modifier aware event has a shift mask.

    Parameters

    • event: ModifierAwareEvent

      the tree modifier aware event.

    Returns boolean

    true if the tree modifier aware event contains the shift mask.

Protected hasTrailingSuffixes

  • hasTrailingSuffixes(node: TreeNode): boolean
  • Determine if the tree node contains trailing suffixes.

    Parameters

    • node: TreeNode

      the tree node.

    Returns boolean

    true if the tree node contains trailing suffices.

Protected inflateFromStorage

  • inflateFromStorage(node: any, parent?: TreeNode): TreeNode
  • Inflate the tree node from storage.

    Parameters

    • node: any

      the tree node.

    • Optional parent: TreeNode

      the optional tree node.

    Returns TreeNode

Protected init

  • init(): void
  • Returns void

Protected isExpandable

  • isExpandable(node: TreeNode): node is ExpandableTreeNode
  • Determine if the tree node is expandable.

    Parameters

    • node: TreeNode

      the tree node.

    Returns node is ExpandableTreeNode

    true if the tree node is expandable.

Protected moveToNextFileNode

Protected moveToPreviousFileNode

Protected needsActiveIndentGuideline

  • needsActiveIndentGuideline(node: TreeNode): boolean
  • Parameters

    • node: TreeNode

    Returns boolean

Protected needsExpansionTogglePadding

  • needsExpansionTogglePadding(node: TreeNode): boolean

Protected onActivateRequest

  • onActivateRequest(msg: Message): void
  • Parameters

    • msg: Message

    Returns void

Protected onAfterAttach

  • onAfterAttach(msg: Message): void
  • Parameters

    • msg: Message

    Returns void

Protected onAfterDetach

  • onAfterDetach(msg: Message): void
  • Parameters

    • msg: Message

    Returns void

Protected onBeforeAttach

  • onBeforeAttach(msg: Message): void
  • Parameters

    • msg: Message

    Returns void

Protected onBeforeDetach

  • onBeforeDetach(msg: Message): void
  • Parameters

    • msg: Message

    Returns void

Protected onCloseRequest

  • onCloseRequest(msg: Message): void
  • Parameters

    • msg: Message

    Returns void

Protected onResize

  • onResize(msg: ResizeMessage): void
  • Parameters

    • msg: ResizeMessage

    Returns void

Protected onUpdateRequest

  • onUpdateRequest(msg: Message): void
  • Parameters

    • msg: Message

    Returns void

Protected openResource

  • openResource(resource: ScmResource): Promise<undefined | EditorWidget>

Protected render

  • render(): ReactNode
  • Returns ReactNode

Protected renderCaption

  • renderCaption(node: TreeNode, props: NodeProps): ReactNode
  • Render the tree node caption given the node properties.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns ReactNode

Protected renderCaptionAffixes

  • renderCaptionAffixes(node: TreeNode, props: NodeProps, affixKey: "captionPrefixes" | "captionSuffixes"): ReactNode
  • Render caption affixes for the given tree node.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    • affixKey: "captionPrefixes" | "captionSuffixes"

      the affix key.

    Returns ReactNode

Protected renderExpansionToggle

  • renderExpansionToggle(node: TreeNode, props: NodeProps): ReactNode
  • Render the node expansion toggle.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns ReactNode

Protected renderIcon

  • renderIcon(node: TreeNode, props: NodeProps): ReactNode
  • Render the tree node given the node properties.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns ReactNode

Protected renderIndent

  • renderIndent(node: TreeNode, props: NodeProps): ReactNode
  • Render indent for the file tree based on the depth

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

    Returns ReactNode

Protected renderNode

  • renderNode(node: TreeNode, props: NodeProps): ReactNode
  • Render the node given the tree node and node properties.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns ReactNode

Protected renderTailDecorations

  • renderTailDecorations(node: TreeNode, props: NodeProps): ReactNode
  • Render the tree node tail decorations.

    Parameters

    • node: TreeNode

      the tree node.

    • props: NodeProps

      the node properties.

    Returns ReactNode

Protected renderTailDecorationsForNode

  • renderTailDecorationsForNode(node: TreeNode, props: NodeProps, tailDecorations: (TailDecoration | TailDecorationIcon | TailDecorationIconClass)[]): ReactNode
  • Parameters

    • node: TreeNode
    • props: NodeProps
    • tailDecorations: (TailDecoration | TailDecorationIcon | TailDecorationIconClass)[]

    Returns ReactNode

Protected renderTree

  • renderTree(model: TreeModel): ReactNode
  • Render the tree widget.

    Parameters

    • model: TreeModel

      the tree model.

    Returns ReactNode

restoreState

  • restoreState(oldState: object): void
  • Restore the state.

    Parameters

    • oldState: object

      the old state object.

    Returns void

Protected scrollToSelected

  • scrollToSelected(): void
  • Scroll to the selected tree node.

    Returns void

setFlag

  • setFlag(flag: Flag): void
  • Parameters

    • flag: Flag

    Returns void

Protected shouldDisplayNode

  • shouldDisplayNode(node: TreeNode): boolean
  • Parameters

    • node: TreeNode

    Returns boolean

storeState

  • storeState(): object
  • Store the tree state.

    Returns object

Protected toContextMenuArgs

  • toContextMenuArgs(node: SelectableTreeNode): undefined | any[]
  • Convert the tree node to context menu arguments.

    Parameters

    • node: SelectableTreeNode

      the selectable tree node.

    Returns undefined | any[]

Protected toNodeDescription

  • toNodeDescription(node: TreeNode): string
  • Parameters

    • node: TreeNode

    Returns string

Protected toNodeIcon

  • toNodeIcon(node: TreeNode): string
  • Parameters

    • node: TreeNode

    Returns string

Protected toNodeName

  • toNodeName(node: TreeNode): string
  • Parameters

    • node: TreeNode

    Returns string

Protected toReactNode

  • toReactNode(caption: string, highlight: CaptionHighlight): ReactNode[]
  • Update the node given the caption and highlight.

    Parameters

    • caption: string

      the caption.

    • highlight: CaptionHighlight

      the tree decoration caption highlight.

    Returns ReactNode[]

Protected updateGlobalSelection

  • updateGlobalSelection(): void
  • Update the global selection for the tree.

    Returns void

Protected updateScrollToRow

  • updateScrollToRow(updateOptions?: ForceUpdateOptions): void
  • Update the scrollToRow.

    Parameters

    • Optional updateOptions: ForceUpdateOptions

      the tree widget force update options.

    Returns void