Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.
/ tree-view Public archive
forked from atom/tree-view

🔒 🌳 Explore and open project files in Pulsar

License

Notifications You must be signed in to change notification settings

pulsar-edit/tree-view

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Repo is now archived under Pulsar, due to being bundled within the Editor

Tree View package

Explore and open files in the current project.

Press ctrl-\ or cmd-\ to open/close the tree view and alt-\ or ctrl-0 to focus it.

When the tree view has focus you can press a, shift-a, m, or delete to add, move or delete files and folders.

To move the Tree view to the opposite side, select and drag the Tree view dock to the other side.

API

This package provides a service that you can use in other Pulsar packages. To use it, include tree-view in the consumedServices section of your package.json:

{
  "name": "my-package",
  "consumedServices": {
    "tree-view": {
      "versions": {
        "^1.0.0": "consumeTreeView"
      }
    }
  }
}

Then, in your package's main module, call methods on the service:

module.exports =
  activate: -> # ...

  consumeTreeView: (treeView) ->
    selectedPaths = treeView.selectedPaths()
    # Do something with the paths...

The tree-view API has two methods:

  • selectedPaths() - Returns the paths to the selected tree view entries.
  • entryForPath(entryPath) - Returns a tree view entry for the given path.

Customization

The tree view displays icons next to files. These icons are customizable by installing a package that provides an atom.file-icons service.

The atom.file-icons service must provide the following methods:

  • iconClassForPath(path) - Returns a CSS class name to add to the file view.

About

🔒 🌳 Explore and open project files in Pulsar

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 88.6%
  • JavaScript 10.5%
  • Less 0.9%