Is there a way to load the editor's "default" tree-view?


Hi, I’m currently facing the issue that if you’re using my packages project-view or tree-view-git-status together with the Nucilde editor you’ll end up with two active tree-views, the tree-view and the nuclide-tree-view. When starting the Nuclide editor only the nuclide-tree-view gets loaded but as soon as one of my packages gets activated also the standard tree-view is getting loaded due to following lines

activate: ->
  atom.packages.activatePackage('tree-view').then (treeViewPkg) =>
    // ...

Currently I’m using this lines to ensure that the tree-view is available and loaded when activating my package. So my question is if there is a.) a better way to load the tree-view and b.) if there is a way to load the editor’s “default” tree view which can be either tree-view, nuclide-tree-view, or something else.

Thanks :slight_smile:


What you really should be doing, rather than forcing the activation of a package is to wait for all packages to be activated before continuing with the part of your activation that depends on other packages. This is typically achieved by creating a handler for the atom.packages.onDidActivateInitialPackages event.


@leedohm Thanks for the hint :slight_smile: I’ll try to rework that part and use the onDidActivateInitialPackages event instead.