Theia API Documentation v1.65.0
    Preparing search index...

    This widget fetches the property data for FileSelections and selections of Navigatables and renders that property data as a TreeWidget. This widget is provided by the registered ResourcePropertyViewWidgetProvider.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    activate addClass addClipboardListener addEventListener addKeyListener addUpdateListener applyFontStyles children clearFlag close contains createCategoryNode createContainerAttributes createNodeAttributes createNodeClassNames createNodeStyle createResultLineNode decorateCaption decorateIcon decorateNodeStyle deflateForStorage disableScrollBarFocus dispose doFocus doHandleExpansionToggleDblClickEvent doRenderNodeRow doToggle doUpdateDecorations doUpdateRows fillPropertiesTree fit getCaptionAttributes getCaptionChildren getContainerTreeNode getCreationTimeString getDecorationData getDecorations getDefaultNodeStyle getDepthForNode getDepthPadding getFileName getFilePath getIconClass getLastModificationString getLocationString getNodeToFocus getNodeTooltip getPaddingLeft getPreviewNode getScrollContainer getScrollToRow getSizeString getVirtualizedScrollState handleAuxClickEvent handleClickEvent handleContextMenuEvent handleDblClickEvent handleDown handleEnter handleEscape handleGlobalSelectionOnDisposal handleGlobalSelectionOnFocusIn handleGlobalSelectionOnFocusServiceFocusChange handleGlobalSelectionOnModelSelectionChange handleLeft handleMiddleClickEvent handleRight handleSpace handleUp handleVisiblityChanged hasClass hasCtrlCmdMask hasShiftMask hasTrailingSuffixes hide inflateFromStorage init isExpandable isScrolledToBottom needsActiveIndentGuideline needsExpansionTogglePadding notifyLayout onActivateRequest onAfterAttach onAfterDetach onAfterHide onAfterShow onBeforeAttach onBeforeDetach onBeforeHide onBeforeShow onChildAdded onChildRemoved onCloseRequest onFitRequest onResize onUpdateRequest processMessage refreshModelChildren registerGlobalSelectionHandlers removeClass render renderCaption renderCaptionAffixes renderCheckbox renderExpandableNode renderExpansionToggle renderIcon renderIndent renderItemNode renderNode renderTailDecorations renderTailDecorationsForNode renderTree restoreState rowIsSelected scrollToSelected setFlag setHidden shouldDisplayNode shouldRenderIndent shouldUpdateGlobalSelection show storeState tapNode testFlag toContextMenuArgs toggleChecked toggleClass toNodeDescription toNodeIcon toNodeName toNodeRow toReactNode update updateGlobalSelection updateNeeded updatePropertyViewContent updateScrollToRow

    Constructors

    Properties

    contextMenuRenderer: ContextMenuRenderer
    corePreferences: CorePreferences
    currentSelection: undefined | Object
    decorations: Map<string, WidgetDecoration.Data[]>
    decoratorService: TreeDecoratorService
    focusService: TreeFocusService
    handleExpansionToggleDblClickEvent: (event: MouseEvent<HTMLElement>) => void

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

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

    Store the last scroll state.

    Type Declaration

    • undefined
    • { scrollLeft: number; scrollTop: number }
      • scrollLeft: number

        The scroll left value.

      • scrollTop: number

        The scroll top value.

    model: TreeModel
    node: HTMLElement

    Get the DOM node owned by the widget.

    nodeRoot: Root
    onDidChangeVisibility: Event<boolean>
    onDidChangeVisibilityEmitter: Emitter<boolean>
    onDidDispose: Event<void>
    onDidDisposeEmitter: Emitter<void>
    onScrollEmitter: Emitter<TreeScrollEvent>
    onScrollUp: Event<void>
    onScrollUpEmitter: Emitter<void>
    onScrollYReachEnd: Event<void>
    onScrollYReachEndEmitter: Emitter<void>
    preferenceService: PreferenceService
    propertiesTree: Map<string, ResourcePropertiesCategoryNode>
    props: TreeProps
    renderNodeRow: (row: NodeRow) => ReactNode

    Render the node row.

    rows: Map<string, NodeRow>
    scheduleUpdateScrollToRow: any
    scrollArea: Element
    scrollBar?: PerfectScrollbar
    ScrollingRowRenderer: FC<{ rows: NodeRow[] }>
    scrollOptions?: Options
    scrollToRow: undefined | number

    Row index to ensure visibility.

    • Used to forcefully scroll if necessary.
    searchBox: SearchBox
    searchBoxFactory: SearchBoxFactory
    searchHighlights: Map<string, WidgetDecoration.CaptionHighlight>
    selectionService: SelectionService
    shouldScrollToRow: boolean
    toDisposeOnDetach: DisposableCollection
    toggle: (event: MouseEvent<HTMLElement>) => void

    Toggle the node.

    treeIndent: number
    treeSearch: TreeSearch
    updateDecorations: any

    Update tree decorations.

    • Updating decorations are debounced in order to limit the number of expensive updates.
    updateRows: any
    view: undefined | TreeWidget.View
    ID: "resource-properties-tree-widget" = 'resource-properties-tree-widget'
    LABEL: "Resource Properties Tree" = 'Resource Properties Tree'

    Accessors

    • get dataset(): DOMStringMap

      The dataset for the widget's DOM node.

      Returns DOMStringMap

    • get disposed(): ISignal<this, void>

      A signal emitted when the widget is disposed.

      Returns ISignal<this, void>

    • get hiddenMode(): HiddenMode

      Get the method for hiding the widget.

      Returns HiddenMode

    • set hiddenMode(value: HiddenMode): void

      Set the method for hiding the widget.

      Parameters

      Returns void

    • get id(): string

      Get the id of the widget's DOM node.

      Returns string

    • set id(value: string): void

      Set the id of the widget's DOM node.

      Parameters

      • value: string

      Returns void

    • get isAttached(): boolean

      Test whether the widget's node is attached to the DOM.

      Returns boolean

    • get isDisposed(): boolean

      Test whether the widget has been disposed.

      Returns boolean

    • get isHidden(): boolean

      Test whether the widget is explicitly hidden.

      Returns boolean

    • get isVisible(): boolean

      Test whether the widget is visible.

      A widget is visible when it is attached to the DOM, is not explicitly hidden, and has no explicitly hidden ancestors.

      Returns boolean

    • get layout(): null | Layout

      Get the layout for the widget.

      Returns null | Layout

    • set layout(value: null | Layout): void

      Set the layout for the widget.

      The layout is single-use only. It cannot be changed after the first assignment.

      The layout is disposed automatically when the widget is disposed.

      Parameters

      Returns void

    • get parent(): null | Widget

      Get the parent of the widget.

      Returns null | Widget

    • set parent(value: null | Widget): void

      Set the parent of the widget.

      Children are typically added to a widget by using a layout, which means user code will not normally set the parent widget directly.

      The widget will be automatically removed from its old parent.

      This is a no-op if there is no effective parent change.

      Parameters

      Returns void

    • get title(): Title<Widget>

      The title object for the widget.

      The title object is used by some container widgets when displaying the widget alongside some title, such as a tab panel or side bar.

      Since not all widgets will use the title, it is created on demand.

      The owner property of the title is set to this widget.

      Returns Title<Widget>

    Methods

    • Post an 'activate-request' message to the widget.

      This is a simple convenience method for posting the message.

      Returns void

    • Add a class name to the widget's DOM node.

      Parameters

      • name: string

        The class name to add to the node.

        If the class name is already added to the node, this is a no-op.

        The class name must not contain whitespace.

      Returns void

    • Type Parameters

      • K extends keyof HTMLElementEventMap

      Parameters

      • element: HTMLElement
      • type: K
      • OptionaluseCapture: boolean

      Returns void

    • Apply font styles to the tree.

      Parameters

      • original: CSSProperties

        the original css properties.

      • fontData: undefined | FontData

        the optional fontData.

      Returns CSSProperties

    • Create an iterator over the widget's children.

      Returns IterableIterator<Widget>

      A new iterator over the children of the widget.

      The widget must have a populated layout in order to have children.

      If a layout is not installed, the returned iterator will be empty.

    • Send a 'close-request' message to the widget.

      This is a simple convenience method for sending the message.

      Returns void

    • Test whether a widget is a descendant of this widget.

      Parameters

      • widget: Widget

        The descendant widget of interest.

      Returns boolean

      true if the widget is a descendant, false otherwise.

    • Create the container attributes for the widget.

      Returns HTMLAttributes<HTMLElement>

    • Create the node class names.

      Parameters

      Returns string[]

      the list of tree node class names.

    • Create the tree node style.

      Parameters

      Returns undefined | CSSProperties

    • Decorate the tree caption.

      Parameters

      • node: TreeNode

        the tree node.

      • attrs: HTMLAttributes<HTMLElement>

        the additional attributes.

      Returns Attributes & HTMLAttributes<HTMLElement>

    • Decorate the tree node icon.

      Parameters

      • node: TreeNode

        the tree node.

      • icon: ReactNode

        the icon.

      Returns ReactNode

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

    • Deflate the tree node for storage.

      Parameters

      Returns object

    • Parameters

      • scrollContainer: HTMLElement

      Returns void

    • Dispose of the widget and its descendant widgets.

      It is unsafe to use the widget after it has been disposed.

      All calls made to this method after the first are a no-op.

      Returns void

    • Actually focus the tree node.

      Returns void

    • Actually handle the double-click mouse event on the expansion toggle.

      Parameters

      • event: MouseEvent<HTMLElement>

        the double-click mouse event.

      Returns void

    • Actually render the node row.

      Parameters

      Returns ReactNode

    • Actually toggle the tree node.

      Parameters

      • event: MouseEvent<HTMLElement>

        the mouse click event.

      Returns void

    • Returns Promise<void>

    • Returns void

    • Post a 'fit-request' message to the widget.

      This is a simple convenience method for posting the message.

      Returns void

    • Get the container tree node.

      Returns undefined | TreeNode

      the tree node for the container if available.

    • Get the default node style.

      Parameters

      Returns undefined | CSSProperties

      the CSS properties if available.

    • Parameters

      • depth: number

      Returns number

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

      • OptionaladditionalClasses: string[]

        additional CSS classes.

      Returns string

      the icon class name.

    • Returns undefined | Node

    • Get the scrollToRow.

      Returns undefined | number

      the scrollToRow if available.

    • Get the current scroll state from the virtualized view. This should be used instead of accessing the DOM scroll properties directly when the tree is virtualized.

      Returns undefined | TreeScrollState

    • Handle the middle-click mouse event.

      Parameters

      • node: undefined | TreeNode

        the tree node if available.

      • event: MouseEvent<HTMLElement>

        the middle-click mouse event.

      Returns void

    • Handle the single-click mouse event.

      Parameters

      • node: undefined | TreeNode

        the tree node if available.

      • event: MouseEvent<HTMLElement>

        the mouse single-click event.

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

        the right-click mouse event.

      Returns void

    • Handle the double-click mouse event.

      Parameters

      • node: undefined | TreeNode

        the tree node if available.

      • event: MouseEvent<HTMLElement>

        the double-click mouse event.

      Returns void

    • Handle the down arrow keyboard event.

      Parameters

      • event: KeyboardEvent

        the down arrow keyboard event.

      Returns void

    • Handle the enter key keyboard event.

      • enter opens the tree node.

      Parameters

      • event: KeyboardEvent

        the enter key keyboard event.

      Returns void

    • Parameters

      • event: KeyboardEvent

      Returns void

    • Handle the left arrow keyboard event.

      Parameters

      • event: KeyboardEvent

        the left arrow keyboard event.

      Returns Promise<void>

    • Handle the middle-click mouse event.

      Parameters

      • event: MouseEvent

        the middle-click mouse event.

      Returns void

    • Handle the right arrow keyboard event.

      Parameters

      • event: KeyboardEvent

        the right arrow keyboard event.

      Returns Promise<void>

    • Handle the space key keyboard event.

      • If the element has a checkbox, it will be toggled.
      • Otherwise, it should be similar to a single-click action.

      Parameters

      • event: KeyboardEvent

        the space key keyboard event.

      Returns void

    • Handle the up arrow keyboard event.

      Parameters

      • event: KeyboardEvent

        the up arrow keyboard event.

      Returns void

    • Parameters

      • isNowVisible: boolean

      Returns void

    • Test whether the widget's DOM node has the given class name.

      Parameters

      • name: string

        The class name of interest.

      Returns boolean

      true if the node has the class, false otherwise.

    • Determine if the tree modifier aware event has a ctrlcmd mask.

      Parameters

      Returns boolean

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

    • Determine if the tree modifier aware event has a shift mask.

      Parameters

      Returns boolean

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

    • Determine if the tree node contains trailing suffixes.

      Parameters

      Returns boolean

      true if the tree node contains trailing suffices.

    • Hide the widget and make it hidden to its parent widget.

      This causes the isHidden property to be true.

      If the widget is explicitly hidden, this is a no-op.

      Returns void

    • Check if the tree is scrolled to the bottom. Works with both virtualized and non-virtualized trees.

      Returns boolean

    • If the node is a composite, a toggle will be rendered. Otherwise we need to add the width and the left, right padding => 18px

      Parameters

      Returns boolean

    • Invoke the message processing routine of the widget's layout.

      Parameters

      • msg: Message

        The message to dispatch to the layout.

        This is a no-op if the widget does not have a layout.

        This will not typically be called directly by user code.

      Returns void

    • Remove a class name from the widget's DOM node.

      Parameters

      • name: string

        The class name to remove from the node.

        If the class name is not yet added to the node, this is a no-op.

        The class name must not contain whitespace.

      Returns void

    • Render the React widget in the DOM.

      • If the widget has been previously rendered, any subsequent calls will perform an update and only change the DOM if absolutely necessary.

      Returns 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

    • Render the tree node given the node properties.

      Parameters

      Returns ReactNode

    • Render indent for the file tree based on the depth

      Parameters

      Returns ReactNode

    • Render the node given the tree node and node properties.

      Parameters

      Returns ReactNode

    • Render the tree widget.

      Parameters

      Returns ReactNode

    • Restore the state.

      Parameters

      • oldState: object

        the old state object.

      Returns void

    • Scroll to the selected tree node.

      Returns void

    • Set the given widget flag.

      This will not typically be called directly by user code.

      Parameters

      Returns void

    • Show or hide the widget according to a boolean value.

      Parameters

      • hidden: boolean

        true to hide the widget, or false to show it.

        This is a convenience method for hide() and show().

      Returns void

    • Determines whether an indentation div should be rendered for the specified tree node. If there are multiple tree nodes inside of a single rendered row, this method should only return true for the first node.

      Parameters

      Returns boolean

    • Show the widget and make it visible to its parent widget.

      This causes the isHidden property to be false.

      If the widget is not explicitly hidden, this is a no-op.

      Returns void

    • Store the tree state.

      Returns object

    • The effective handler of an unmodified single-click event.

      Parameters

      Returns void

    • Test whether the given widget flag is set.

      This will not typically be called directly by user code.

      Parameters

      Returns boolean

    • Parameters

      • event: MouseEvent<HTMLElement>

      Returns void

    • Toggle a class name on the widget's DOM node.

      Parameters

      • name: string

        The class name to toggle on the node.

      • Optionalforce: boolean

        Whether to force add the class (true) or force remove the class (false). If not provided, the presence of the class will be toggled from its current state.

      Returns boolean

      true if the class is now present, false otherwise.

      The class name must not contain whitespace.

    • Post an 'update-request' message to the widget.

      This is a simple convenience method for posting the message.

      Returns void

    • Update the global selection for the tree.

      Returns void

    • Update the scrollToRow.

      Returns void