Move enable/disable to parent Package class

This was previously unimplemented in TextMatePackage causing exceptions
when trying to enable/disable a package of that type.
This commit is contained in:
Kevin Sawicki
2014-01-09 14:13:46 -08:00
parent 69f9f10c6b
commit d96b63d791
2 changed files with 6 additions and 6 deletions

View File

@@ -52,12 +52,6 @@ class AtomPackage extends Package
console.warn "Failed to load package named '#{@name}'", e.stack ? e
this
enable: ->
atom.config.removeAtKeyPath('core.disabledPackages', @metadata.name)
disable: ->
atom.config.pushAtKeyPath('core.disabledPackages', @metadata.name)
reset: ->
@stylesheets = []
@keymaps = []

View File

@@ -47,6 +47,12 @@ class Package
isActive: ->
atom.packages.isPackageActive(@name)
enable: ->
atom.config.removeAtKeyPath('core.disabledPackages', @metadata.name)
disable: ->
atom.config.pushAtKeyPath('core.disabledPackages', @metadata.name)
isTheme: ->
!!@metadata?.theme