Determine if activeItem is TreeView


Hi folks,
I’m wondering - how do I access the TreeView class? I’d like to determine whether a pane’s items (atom.workspace.getPanes()[0].items) includes a TreeView.

I could check the item’s .element.className attribute, to see if it contains tree-view, but I think there must be a better way :slight_smile:

I apologize if this has been answered - new to messing around with atom!



Depends what you’re interested in. As of this PR looks like tree-view now lives in a dock. If you’re interested in everything in the left ‘border’ (or any other border) you probably want the dock, since other packages besides tree-view can place elements for their tools there (just grabbing the tree-view you may miss other elements in the dock).