From efea16848aec0139574a55cee6040708f988e791 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 8 Sep 2014 16:05:07 -0700 Subject: [PATCH] Add deprecation warnings for all the other converted events --- src/editor.coffee | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/editor.coffee b/src/editor.coffee index ab23b5968..17128e8b0 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -341,6 +341,46 @@ class Editor extends Model on: (eventName) -> switch eventName + when 'title-changed' + deprecate("Use Editor::onDidChangeTitle instead") + when 'path-changed' + deprecate("Use Editor::onDidChangePath instead") + when 'modified-status-changed' + deprecate("Use Editor::onDidChangeModified instead") + when 'soft-wrap-changed' + deprecate("Use Editor::onDidChangeSoftWrapped instead") + when 'grammar-changed' + deprecate("Use Editor::onDidChangeGrammar instead") + when 'character-widths-changed' + deprecate("Use Editor::onDidChangeCharacterWidths instead") + when 'contents-modified' + deprecate("Use Editor::onDidStopChanging instead") + when 'contents-conflicted' + deprecate("Use Editor::onDidConflict instead") + + when 'will-insert-text' + deprecate("Use Editor::onWillInsertText instead") + when 'did-insert-text' + deprecate("Use Editor::onDidInsertText instead") + + when 'cursor-added' + deprecate("Use Editor::onDidAddCursor instead") + when 'cursor-removed' + deprecate("Use Editor::onDidRemoveCursor instead") + + when 'selection-added' + deprecate("Use Editor::onDidAddSelection instead") + when 'selection-removed' + deprecate("Use Editor::onDidRemoveSelection instead") + + when 'decoration-added' + deprecate("Use Editor::onDidAddDecoration instead") + when 'decoration-removed' + deprecate("Use Editor::onDidRemoveDecoration instead") + when 'decoration-updated' + deprecate("Use Decoration::onDidChangeProperties instead. You will get the decoration back from `Editor::decorateMarker()`") + when 'decoration-changed' + deprecate("Use Marker::onDidChange instead. eg. `editor::decorateMarker(...).getMarker().onDidChange()`") when 'screen-lines-changed' deprecate("Use Editor::onDidChangeScreenLines instead")