Rename AtomEnvironment::removeEditorWindow -> ::destroy

This commit is contained in:
Max Brunsfeld
2015-10-08 17:51:27 -07:00
parent 5c545c0898
commit 7617c35856
3 changed files with 34 additions and 30 deletions

View File

@@ -255,6 +255,17 @@ class AtomEnvironment extends Model
@packages.serviceHub.clear()
destroy: ->
return if not @project
@workspace?.destroy()
@workspace = null
@themes.workspace = null
@project?.destroy()
@project = null
@windowEventHandler?.unsubscribe()
###
Section: Event Subscription
###
@@ -604,18 +615,6 @@ class AtomEnvironment extends Model
@state.packageStates = @packages.packageStates
@state.fullScreen = @isFullScreen()
@saveStateSync()
@windowState = null
removeEditorWindow: ->
return if not @project
@workspace?.destroy()
@workspace = null
@themes.workspace = null
@project?.destroy()
@project = null
@windowEventHandler?.unsubscribe()
openInitialEmptyEditorIfNecessary: ->
return unless @config.get('core.openEmptyEditorOnStart')