mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
activeWindow.project and project.paths array
This commit is contained in:
@@ -21,6 +21,8 @@ class Project extends Pane
|
||||
@reload(File.workingDirectory())
|
||||
@editor = activeWindow.document
|
||||
|
||||
activeWindow.project = this
|
||||
|
||||
@editor.ace.on 'open', ({filename}) =>
|
||||
if File.isDirectory filename
|
||||
@reload filename
|
||||
@@ -93,6 +95,13 @@ class Project extends Pane
|
||||
|
||||
list
|
||||
|
||||
paths: ->
|
||||
_paths = []
|
||||
for dir in File.list @dir
|
||||
continue if /\.git|Cocoa/.test dir
|
||||
_paths.push File.listDirectoryTree dir
|
||||
_.reject _.flatten(_paths), (dir) -> File.isDirectory dir
|
||||
|
||||
# HATE
|
||||
# This needs to be replaced with a more generalized method like
|
||||
# Atomicity.store or better yet, add it to Pane so each pane has it's
|
||||
|
||||
Reference in New Issue
Block a user