From 66c1522dccaa1d17ddef8f0faa8aa54154988abb Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Wed, 6 May 2015 13:00:51 -0300 Subject: [PATCH] Closes #178. Change commands' namespace from "beautify" to "atom-beautify" --- README.md | 2 +- keymaps/atom-beautify.cson | 2 +- menus/atom-beautify.cson | 12 ++++++------ package.json | 7 ++++--- src/beautify.coffee | 12 ++++++++---- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 70ca774..1773a7e 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ For example: ```coffeescript '.editor': - 'ctrl-alt-b': 'beautify:beautify-editor' + 'ctrl-alt-b': 'atom-beautify:beautify-editor' ``` ### Package Options diff --git a/keymaps/atom-beautify.cson b/keymaps/atom-beautify.cson index 15e5b73..81cc7fe 100644 --- a/keymaps/atom-beautify.cson +++ b/keymaps/atom-beautify.cson @@ -8,4 +8,4 @@ # For more detailed documentation see # https://atom.io/docs/latest/advanced/keymaps 'atom-text-editor': - 'ctrl-alt-b': 'beautify:beautify-editor' + 'ctrl-alt-b': 'atom-beautify:beautify-editor' diff --git a/menus/atom-beautify.cson b/menus/atom-beautify.cson index b60a257..e437d4d 100644 --- a/menus/atom-beautify.cson +++ b/menus/atom-beautify.cson @@ -1,14 +1,14 @@ # See https://atom.io/docs/latest/creating-a-package#menus for more details 'context-menu': 'atom-workspace atom-text-editor:not(.mini)': [ - {label: 'Beautify editor contents', command: 'beautify:beautify-editor'} - {label: 'Debug Atom Beautify', command: 'beautify:help-debug-editor'} + {label: 'Beautify editor contents', command: 'atom-beautify:beautify-editor'} + {label: 'Debug Atom Beautify', command: 'atom-beautify:help-debug-editor'} ] '.tree-view .file > .name': [ - {label: 'Beautify File', command: 'beautify:beautify-file'} + {label: 'Beautify File', command: 'atom-beautify:beautify-file'} ] # '.tree-view .directory > .header > .name': [ -# {label: 'Beautify Directory', command: 'beautify:beautify-directory'} +# {label: 'Beautify Directory', command: 'atom-beautify:beautify-directory'} # ] 'menu': [ @@ -19,11 +19,11 @@ 'submenu': [ { 'label': 'Beautify' - 'command': 'beautify:beautify-editor' + 'command': 'atom-beautify:beautify-editor' } { 'label': 'Debug' - 'command': 'beautify:help-debug-editor' + 'command': 'atom-beautify:help-debug-editor' } ] ] diff --git a/package.json b/package.json index 175ea88..1a33971 100644 --- a/package.json +++ b/package.json @@ -79,16 +79,17 @@ }, "activationCommands": { "atom-workspace": [ - "beautify:help-debug-editor", + "atom-beautify:help-debug-editor", + "atom-beautify:beautify-editor", "beautify:beautify-editor", "core:save", "core:save-as" ], ".tree-view .file .name": [ - "beautify:beautify-file" + "atom-beautify:beautify-file" ], ".tree-view .directory .name": [ - "beautify:beautify-directory" + "atom-beautify:beautify-directory" ] }, "keywords": [ diff --git a/src/beautify.coffee b/src/beautify.coffee index 9341a7f..73f113f 100644 --- a/src/beautify.coffee +++ b/src/beautify.coffee @@ -383,7 +383,11 @@ plugin.config = _.merge( plugin.activate = -> handleSaveEvent() plugin.subscribe atom.config.observe("atom-beautify.beautifyOnSave", handleSaveEvent) - atom.commands.add "atom-workspace", "beautify:beautify-editor", beautify - atom.commands.add "atom-workspace", "beautify:help-debug-editor", debug - atom.commands.add ".tree-view .file .name", "beautify:beautify-file", beautifyFile - atom.commands.add ".tree-view .directory .name", "beautify:beautify-directory", beautifyDirectory + atom.commands.add "atom-workspace", "atom-beautify:beautify-editor", beautify + atom.commands.add "atom-workspace", "atom-beautify:help-debug-editor", debug + atom.commands.add ".tree-view .file .name", "atom-beautify:beautify-file", beautifyFile + atom.commands.add ".tree-view .directory .name", "atom-beautify:beautify-directory", beautifyDirectory + # Deprecated command + atom.commands.add "atom-workspace", "beautify:beautify-editor", -> + atom?.notifications.addWarning("The command \"beautify:beautify-editor\" has been removed and changed to \"atom-beautify:beautify-editor\".", dismissable: true) +