mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Move package reset down into PackageManager
This commit is contained in:
parent
4863b71fd7
commit
60e4b78da3
@ -91,8 +91,6 @@ beforeEach ->
|
||||
spyOn(window, "setTimeout").andCallFake window.fakeSetTimeout
|
||||
spyOn(window, "clearTimeout").andCallFake window.fakeClearTimeout
|
||||
|
||||
atom.packages.packageStates = {}
|
||||
|
||||
serializedWindowState = null
|
||||
|
||||
spyOn(atom, 'saveStateSync')
|
||||
@ -141,14 +139,11 @@ beforeEach ->
|
||||
addCustomMatchers(this)
|
||||
|
||||
afterEach ->
|
||||
atom.packages.deactivatePackages()
|
||||
|
||||
atom.workspace?.destroy()
|
||||
atom.workspace = null
|
||||
atom.themes.workspace = null
|
||||
delete atom.state.workspace
|
||||
|
||||
delete atom.state.packageStates
|
||||
atom.reset()
|
||||
|
||||
document.getElementById('jasmine-content').innerHTML = '' unless window.debugContent
|
||||
|
@ -253,10 +253,12 @@ class AtomEnvironment extends Model
|
||||
|
||||
@contextMenu.clear()
|
||||
|
||||
@packages.serviceHub.clear()
|
||||
@packages.reset()
|
||||
|
||||
@project.reset(@packages)
|
||||
|
||||
@state.packageStates = {}
|
||||
|
||||
destroy: ->
|
||||
return if not @project
|
||||
|
||||
|
@ -52,6 +52,11 @@ class PackageManager
|
||||
|
||||
setThemeManager: (@themeManager) ->
|
||||
|
||||
reset: ->
|
||||
@serviceHub.clear()
|
||||
@deactivatePackages()
|
||||
@packageStates = {}
|
||||
|
||||
###
|
||||
Section: Event Subscription
|
||||
###
|
||||
|
Loading…
Reference in New Issue
Block a user