Class: StoryTreeProvider

StoryTreeProvider()

Tree data provider for displaying pending Shortcut stories and their tasks. Implements the VS Code TreeDataProvider interface to create a hierarchical view of: Workspace -> Stories -> Tasks

The tree shows pending stories and their tasks, grouped by workspace. Each workspace displays the number of pending stories in parentheses. Empty workspaces can be optionally hidden via configuration. Stories show their ID and can be expanded to show tasks. Tasks display their completion status with a checkbox icon.

Constructor

new StoryTreeProvider()

Source:

Classes

StoryTreeProvider

Members

_onDidChangeTreeData

Event emitter for notifying VS Code when the tree data changes

Source:

(private) _onDidChangeTreeData :vscode.EventEmitter.<(TreeItem|undefined|null|void)>

Event emitter for notifying VS Code when the tree data changes

Type:
  • vscode.EventEmitter.<(TreeItem|undefined|null|void)>
Source:

config

Configuration settings for the tree view

Source:

(private) config :Config

Configuration settings for the tree view

Type:
Source:

onDidChangeTreeData

Event that VS Code listens to for tree data changes

Source:

onDidChangeTreeData :vscode.Event.<(TreeItem|undefined|null|void)>

Event that VS Code listens to for tree data changes

Type:
  • vscode.Event.<(TreeItem|undefined|null|void)>
Source:

workspaces

Array of workspaces containing stories and tasks

Source:

(private) workspaces :Array

Array of workspaces containing stories and tasks

Type:
  • Array
Source:

Methods

getChildren(elementopt) → {Thenable.<Array.<TreeItem>>}

Gets the children of a tree item. Handles the hierarchical structure of the tree:

  • Root level shows workspaces with pending story counts
  • Workspaces contain stories with their IDs
  • Stories contain tasks with completion status

Empty workspaces can be filtered out based on configuration.

Parameters:
Name Type Attributes Description
element TreeItem <optional>

The parent element to get children for

Source:
Returns:

Promise resolving to array of child tree items

Type
Thenable.<Array.<TreeItem>>

getChildren(elementopt) → {Thenable.<Array.<TreeItem>>}

Gets the children of a tree item. Handles the hierarchical structure of the tree:

  • Root level shows workspaces with pending story counts
  • Workspaces contain stories with their IDs
  • Stories contain tasks with completion status

Empty workspaces can be filtered out based on configuration.

Parameters:
Name Type Attributes Description
element TreeItem <optional>

The parent element to get children for

Source:
Returns:

Promise resolving to array of child tree items

Type
Thenable.<Array.<TreeItem>>

getTreeItem(element) → {vscode.TreeItem}

Gets the tree item for an element. Required by VS Code's TreeDataProvider interface.

Parameters:
Name Type Description
element TreeItem

The element to get the tree item for

Source:
Returns:

The tree item for the element

Type
vscode.TreeItem

getTreeItem(element) → {vscode.TreeItem}

Gets the tree item for an element. Required by VS Code's TreeDataProvider interface.

Parameters:
Name Type Description
element TreeItem

The element to get the tree item for

Source:
Returns:

The tree item for the element

Type
vscode.TreeItem

refresh(workspaces, config)

Refreshes the tree view with updated workspace data and configuration. Triggers a re-render of the entire tree.

Parameters:
Name Type Description
workspaces Array.<Workspace>

Array of workspaces to display

config Config

Updated configuration settings

Source:

refresh(workspaces, config) → {void}

Refreshes the tree view with updated workspace data and configuration. Triggers a re-render of the entire tree.

Parameters:
Name Type Description
workspaces Array.<Workspace>

Array of workspaces to display

config Config

Updated configuration settings

Source:
Returns:
Type
void