Serialize TextBuffer inside EditSession serialize

This commit is contained in:
Mutwin Kraus
2013-03-26 14:46:45 +01:00
committed by Nathan Sobo
parent 693d8258ad
commit cc87595e4e
5 changed files with 69 additions and 19 deletions

View File

@@ -87,9 +87,6 @@ class Project
buildEditSession: (filePath, editSessionOptions={}) ->
@buildEditSessionForBuffer(@bufferForPath(filePath), editSessionOptions)
buildEditSessionFromState: (state, editSessionOptions={}) ->
@buildEditSessionForBuffer(@bufferForState(state), editSessionOptions)
buildEditSessionForBuffer: (buffer, editSessionOptions) ->
options = _.extend(@defaultEditSessionOptions(), editSessionOptions)
options.project = this
@@ -141,11 +138,6 @@ class Project
else
@buildBuffer()
bufferForState: (state) ->
buffer = @buildBuffer()
buffer.setText(state) if state
buffer
buildBuffer: (filePath) ->
buffer = new Buffer(filePath, this)
@buffers.push buffer