Add dummy commands prior to package activation so they appear in palette

Fixes #3846
This commit is contained in:
Nathan Sobo
2014-10-15 18:55:38 -06:00
parent c8a18dfaf8
commit 231295cb2c

View File

@@ -338,7 +338,9 @@ class Package
for selector, commands of @getActivationCommands()
for command in commands
do (selector, command) =>
atom.commands.commandRegistered(command)
# Add dummy command so it appears in menu.
# The real command will be registered on package activation
@activationCommandSubscriptions.add atom.commands.add selector, command, ->
@activationCommandSubscriptions.add(atom.commands.onWillDispatch (event) =>
return unless event.type is command
currentTarget = event.target