Deprecate custom events on EditorView

This commit is contained in:
Kevin Sawicki 2014-09-17 16:33:05 -07:00
parent 291b989ff0
commit 1b25ea8a8d

View File

@ -198,6 +198,16 @@ class WorkspaceView extends View
deprecate('Use Workspace::onDidOpen instead')
originalOn.apply(this, arguments)
EditorView = require './editor-view'
originalEditorOn = EditorView::on
EditorView::on = (eventName) ->
switch eventName
when 'cursor:moved'
deprecate('Use Editor::onDidChangeCursorPosition instead')
when 'selection:changed'
deprecate('Use Editor::onDidChangeSelectionRange instead')
originalEditorOn.apply(this, arguments)
###
Section: Accessing the Workspace Model
###