mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Rename WorkspaceView::eachEditor to eachEditorView
This commit is contained in:
@@ -70,10 +70,10 @@
|
||||
"atom-dark-syntax": "0.6.0",
|
||||
"base16-tomorrow-dark-theme": "0.6.0",
|
||||
"solarized-dark-syntax": "0.4.0",
|
||||
"archive-view": "0.15.0",
|
||||
"autocomplete": "0.16.0",
|
||||
"archive-view": "0.16.0",
|
||||
"autocomplete": "0.17.0",
|
||||
"autoflow": "0.10.0",
|
||||
"autosave": "0.8.0",
|
||||
"autosave": "0.9.0",
|
||||
"bookmarks": "0.14.0",
|
||||
"bracket-matcher": "0.13.0",
|
||||
"command-logger": "0.8.0",
|
||||
@@ -107,7 +107,7 @@
|
||||
"to-the-hubs": "0.14.0",
|
||||
"tree-view": "0.40.0",
|
||||
"visual-bell": "0.6.0",
|
||||
"whitespace": "0.9.0",
|
||||
"whitespace": "0.10.0",
|
||||
"wrap-guide": "0.7.0",
|
||||
"language-c": "0.2.0",
|
||||
"language-clojure": "0.1.0",
|
||||
|
||||
@@ -487,7 +487,7 @@ describe "WorkspaceView", ->
|
||||
lowerRightEditor = rightEditor.splitDown()
|
||||
expect(lowerRightEditor.find(".line:first").text()).toBe " "
|
||||
|
||||
describe ".eachEditor(callback)", ->
|
||||
describe ".eachEditorView(callback)", ->
|
||||
beforeEach ->
|
||||
atom.workspaceView.attachToDom()
|
||||
|
||||
@@ -497,7 +497,7 @@ describe "WorkspaceView", ->
|
||||
callback = (editor) ->
|
||||
callbackEditor = editor
|
||||
count++
|
||||
atom.workspaceView.eachEditor(callback)
|
||||
atom.workspaceView.eachEditorView(callback)
|
||||
expect(count).toBe 1
|
||||
expect(callbackEditor).toBe atom.workspaceView.getActiveView()
|
||||
|
||||
@@ -508,7 +508,7 @@ describe "WorkspaceView", ->
|
||||
callbackEditor = editor
|
||||
count++
|
||||
|
||||
atom.workspaceView.eachEditor(callback)
|
||||
atom.workspaceView.eachEditorView(callback)
|
||||
count = 0
|
||||
callbackEditor = null
|
||||
atom.workspaceView.getActiveView().splitRight()
|
||||
@@ -519,7 +519,7 @@ describe "WorkspaceView", ->
|
||||
count = 0
|
||||
callback = (editor) -> count++
|
||||
|
||||
subscription = atom.workspaceView.eachEditor(callback)
|
||||
subscription = atom.workspaceView.eachEditorView(callback)
|
||||
expect(count).toBe 1
|
||||
atom.workspaceView.getActiveView().splitRight()
|
||||
expect(count).toBe 2
|
||||
|
||||
@@ -27,8 +27,8 @@ TextMateScopeSelector = require('first-mate').ScopeSelector
|
||||
#
|
||||
# ## Example
|
||||
# ```coffeescript
|
||||
# global.workspaceView.eachEditor (editor) ->
|
||||
# editor.insertText('Hello World')
|
||||
# atom.workspaceView.eachEditorView (editorView) ->
|
||||
# editorView.insertText('Hello World')
|
||||
# ```
|
||||
#
|
||||
# ## Collaboration builtin
|
||||
|
||||
@@ -305,8 +305,8 @@ class WorkspaceView extends View
|
||||
indexOfPane: (pane) ->
|
||||
@panes.indexOfPane(pane)
|
||||
|
||||
# Private: Fires a callback on each open {EditorView}.
|
||||
eachEditor: (callback) ->
|
||||
# Public: Fires a callback on each open {EditorView}.
|
||||
eachEditorView: (callback) ->
|
||||
callback(editor) for editor in @getEditors()
|
||||
attachedCallback = (e, editor) -> callback(editor)
|
||||
@on('editor:attached', attachedCallback)
|
||||
|
||||
Reference in New Issue
Block a user