mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
extension loaded => running
This commit is contained in:
@@ -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
|
||||
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user