Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScmTreeWidget

Hierarchy

  • TreeWidget
    • ScmTreeWidget

Index

Constructors

Properties

colors: ColorRegistry
decorationsService: DecorationsService
diffNavigatorProvider: DiffNavigatorProvider
editorManager: EditorManager
iconThemeService: IconThemeService
menuCommandExecutor: MenuCommandExecutor
menus: MenuModelRegistry
themeService: ThemeService
ID: string = 'scm-resource-widget'
RESOURCE_CONTEXT_MENU: string[] = ...
RESOURCE_FOLDER_CONTEXT_MENU: string[] = ...
RESOURCE_FOLDER_INLINE_MENU: string[] = ...
RESOURCE_GROUP_CONTEXT_MENU: string[] = ...
RESOURCE_GROUP_INLINE_MENU: string[] = ...
RESOURCE_INLINE_MENU: string[] = ...

Accessors

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

Methods

  • createContainerAttributes(): HTMLAttributes<HTMLElement>
  • getFirstSelectableNode(): undefined | SelectableTreeNode
  • getPaddingLeft(node: TreeNode, props: NodeProps): number
  • goToNextChange(): Promise<void>
  • goToPreviousChange(): Promise<void>
  • handleEnter(event: KeyboardEvent): void
  • 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>

  • 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>

  • init(): void
  • isCurrentThemeLight(): boolean
  • needsExpansionTogglePadding(node: TreeNode): boolean
  • openResource(resource: ScmResource): Promise<undefined | EditorWidget>
  • 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

  • selectNodeByUri(uri: URI): void