From 04cc031da6f576582677bd139989421404e2a41c Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 25 Sep 2013 23:26:18 +0400 Subject: [PATCH] add deprecation message for commmandKeyBinding --- ChangeLog.txt | 25 +++++++++++++++++++++++++ lib/ace/commands/command_manager.js | 6 +----- lib/ace/keyboard/hash_handler.js | 14 ++++++++++++++ 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index d4f5e1d1..81168b8f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,28 @@ + +* New Features + - Accessibility Theme for Ace (Peter Xiao) + - use snipetManager for expanding emmet snippets + - update jshint to 2.1.4 + - improve php syntax checker (jdalegonzalez) + - add option for autoresizing + - add option for autohiding vertical scrollbar + - improvements to highlighting of xml like languages (danyaPostfactum) + - add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others) + - add option to merge similar changes in undo history + - add scrollPastEnd option + - 6a87d97 Merge pull request #1494 from danyaPostfactum/snippetcompleter + - use html5 dragndrop for text dragging (danyaPostfactum) + +* API Changes + - fixed typo in HashHandler commmandManager + +* new language modes + - Nix (Zef Hemel) + - Protobuf (Zef Hemel) + - Soy + - Handlebars + - + 2013.06.04 Version 1.1.01 - Improved emacs keybindings (Robert Krahn) diff --git a/lib/ace/commands/command_manager.js b/lib/ace/commands/command_manager.js index 101227f6..d9704513 100644 --- a/lib/ace/commands/command_manager.js +++ b/lib/ace/commands/command_manager.js @@ -19,11 +19,7 @@ var EventEmitter = require("../lib/event_emitter").EventEmitter; **/ var CommandManager = function(platform, commands) { - this.platform = platform; - this.commands = this.byName = {}; - this.commandKeyBinding = {}; - - this.addCommands(commands); + HashHandler.call(this, commands, platform); this.setDefaultHandler("exec", function(e) { return e.command.exec(e.editor, e.args || {}); diff --git a/lib/ace/keyboard/hash_handler.js b/lib/ace/keyboard/hash_handler.js index 9144b05c..515255f0 100644 --- a/lib/ace/keyboard/hash_handler.js +++ b/lib/ace/keyboard/hash_handler.js @@ -38,6 +38,20 @@ function HashHandler(config, platform) { this.platform = platform || (useragent.isMac ? "mac" : "win"); this.commands = {}; this.commandKeyBinding = {}; + + // todo remove this after a while + if (this.__defineGetter__ && this.__defineSetter__ && typeof console != "undefined" && console.error) { + this.__defineGetter__("commmandKeyBinding", function() { + console.error("commmandKeyBinding has too many m's. use commandKeyBinding") + return this.commandKeyBinding; + }); + this.__defineSetter__("commmandKeyBinding", function(val) { + console.error("commmandKeyBinding has too many m's. use commandKeyBinding") + return this.commandKeyBinding = val; + }); + } else { + this.commmandKeyBinding = commandKeyBinding; + } this.addCommands(config); };