From 7ed4d60967277a4dc890b2066522f52df7a09e0d Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 25 Apr 2016 17:03:26 -0400 Subject: [PATCH] Don't need to pass Project around anymore. --- src/text-editor.coffee | 6 ++---- src/workspace.coffee | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 4ed926848..b9996bd8d 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -81,7 +81,6 @@ class TextEditor extends Model state.config = atomEnvironment.config state.clipboard = atomEnvironment.clipboard state.grammarRegistry = atomEnvironment.grammars - state.project = atomEnvironment.project state.assert = atomEnvironment.assert.bind(atomEnvironment) state.applicationDelegate = atomEnvironment.applicationDelegate editor = new this(state) @@ -97,13 +96,12 @@ class TextEditor extends Model @softTabs, @firstVisibleScreenRow, @firstVisibleScreenColumn, initialLine, initialColumn, tabLength, softWrapped, @displayBuffer, @selectionsMarkerLayer, buffer, suppressCursorCreation, @mini, @placeholderText, lineNumberGutterVisible, largeFileMode, @config, @clipboard, @grammarRegistry, - @project, @assert, @applicationDelegate, grammar, showInvisibles, @autoHeight, @scrollPastEnd + @assert, @applicationDelegate, grammar, showInvisibles, @autoHeight, @scrollPastEnd } = params throw new Error("Must pass a config parameter when constructing TextEditors") unless @config? throw new Error("Must pass a clipboard parameter when constructing TextEditors") unless @clipboard? throw new Error("Must pass a grammarRegistry parameter when constructing TextEditors") unless @grammarRegistry? - throw new Error("Must pass a project parameter when constructing TextEditors") unless @project? throw new Error("Must pass an assert parameter when constructing TextEditors") unless @assert? @firstVisibleScreenRow ?= 0 @@ -516,7 +514,7 @@ class TextEditor extends Model @buffer, displayBuffer, selectionsMarkerLayer, @tabLength, softTabs, suppressCursorCreation: true, @config, @firstVisibleScreenRow, @firstVisibleScreenColumn, - @clipboard, @grammarRegistry, @project, @assert, @applicationDelegate + @clipboard, @grammarRegistry, @assert, @applicationDelegate }) newEditor diff --git a/src/workspace.coffee b/src/workspace.coffee index 9e662c984..29c497b99 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -571,7 +571,7 @@ class Workspace extends Model buildTextEditor: (params) -> params = _.extend({ @config, @clipboard, @grammarRegistry, - @project, @assert, @applicationDelegate + @assert, @applicationDelegate }, params) new TextEditor(params)