       projects.filter ({path}) ->
         path isnt removedPath
 
-module.exports = ->
-  {addedStream, removedStream} = atoms.projectsPaths()
-
-  watchedProjectsStream = addedStream.map (path) ->
+watchedProjects = (addedStream) ->
+  addedStream.map (path) ->
     task = new Task(require.resolve('./watch-project-task.coffee'))
-    task.start(
-      path,
+    task.start(path,
       atom.config.get('core.ignoredNames'),
       atom.config.get('core.excludeVcsIgnoredPaths')
     )

      task: task
    }

  # Only used to manage
  projectsProp = projects(watchedProjectsStream, removedStream)
  deactivateBus = new Bacon.Bus()
  projectsProp.sampledBy(deactivateBus).onValue (projects) ->
    task.send('dispose') for {task} in projects
    return Bacon.noMore

  addItemsStream = watchedProjectsStream.flatMap ({task}) ->
    Bacon.fromEvent(task, 'add')

Bacon = require 'baconjs'
{Task} = require 'atom'
Path = require 'path'
{projectsPaths} = require './streams.coffee'
columns = require './columns.coffee'

# @param {Stream} watchedProjectsStream objects containing a path {String} and a task {Task}
