Rename RootView.editors -> getEditors

This commit is contained in:
Nathan Sobo
2012-07-02 19:47:38 -06:00
parent bd5c1f8694
commit 9cae4d3d8f
5 changed files with 15 additions and 15 deletions

View File

@@ -112,7 +112,7 @@ class RootView extends View
return true
if allowActiveEditorChange
for editor in @editors()
for editor in @getEditors()
if editor.activateEditSessionForPath(path)
editor.focus()
return true
@@ -142,19 +142,19 @@ class RootView extends View
setTitle: (title='untitled') ->
document.title = title
editors: ->
getEditors: ->
@panes.find('.editor').map(-> $(this).view()).toArray()
modifiedBuffers: ->
modifiedBuffers = []
for editor in @editors()
for editor in @getEditors()
for session in editor.editSessions
modifiedBuffers.push session.buffer if session.buffer.isModified()
modifiedBuffers
getOpenBufferPaths: ->
_.uniq(_.flatten(@editors().map (editor) -> editor.getOpenBufferPaths()))
_.uniq(_.flatten(@getEditors().map (editor) -> editor.getOpenBufferPaths()))
getActiveEditor: ->
if (editor = @panes.find('.editor.active')).length
@@ -182,7 +182,7 @@ class RootView extends View
rootPane?.adjustDimensions()
remove: ->
editor.remove() for editor in @editors()
editor.remove() for editor in @getEditors()
@project.destroy()
super

View File

@@ -5,7 +5,7 @@ class StatusBar extends View
@activate: (rootView) ->
requireStylesheet 'status-bar.css'
for editor in rootView.editors()
for editor in rootView.getEditors()
@appendToEditorPane(rootView, editor) if rootView.parents('html').length
rootView.on 'editor-open', (e, editor) =>