extension loaded => running

This commit is contained in:
Chris Wanstrath
2011-11-11 23:42:12 -08:00
parent f4f20b1d4a
commit 385f2c2031
2 changed files with 5 additions and 5 deletions

View File

@@ -1,18 +1,18 @@
# Extension subclasses must call super in all overridden methods.
module.exports =
class Extension
loaded: false
running: false
constructor: ->
console.log "#{@constructor.name}: Loaded"
console.log "#{@constructor.name}: Running"
# `startup` should be called by you in Extension subclasses when they need
# to appear on the screen, attach themselves to a Resource, or otherwise become active.
startup: ->
@loaded = true
@running = true
# `shutdown` shuold be called by you in Extension subclasses when they need
# to be remove from the screen, unattach themselves from a Resource, or otherwise become
# inactive.
shutdown: ->
@loaded = false
@running = false

View File

@@ -59,7 +59,7 @@ class KeyBinder
true
responders: ->
extensions = _.select (_.values atom.extensions), (extension) -> extension.loaded
extensions = _.select (_.values atom.extensions), (extension) -> extension.running?
_.flatten [ extensions, window.resource, window, atom.app ]
triggerBinding: (scope, method) ->