From 8d7f1b8fba62694677aeeb16d3c6870a6ddeb323 Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 25 Apr 2016 16:26:28 -0400 Subject: [PATCH] Don't need to pass view registry through anymore. --- src/text-editor.coffee | 7 ++----- src/workspace.coffee | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index bd0c9f9f8..e30696479 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -80,7 +80,6 @@ class TextEditor extends Model state.selectionsMarkerLayer = displayBuffer.getMarkerLayer(state.selectionsMarkerLayerId) state.config = atomEnvironment.config state.clipboard = atomEnvironment.clipboard - state.viewRegistry = atomEnvironment.views state.grammarRegistry = atomEnvironment.grammars state.project = atomEnvironment.project state.assert = atomEnvironment.assert.bind(atomEnvironment) @@ -97,14 +96,12 @@ class TextEditor extends Model { @softTabs, @firstVisibleScreenRow, @firstVisibleScreenColumn, initialLine, initialColumn, tabLength, softWrapped, @displayBuffer, @selectionsMarkerLayer, buffer, suppressCursorCreation, - @mini, @placeholderText, lineNumberGutterVisible, largeFileMode, @config, - @clipboard, @viewRegistry, @grammarRegistry, + @mini, @placeholderText, lineNumberGutterVisible, largeFileMode, @config, @clipboard, @grammarRegistry, @project, @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 viewRegistry parameter when constructing TextEditors") unless @viewRegistry? 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? @@ -521,7 +518,7 @@ class TextEditor extends Model @buffer, displayBuffer, selectionsMarkerLayer, @tabLength, softTabs, suppressCursorCreation: true, @config, @firstVisibleScreenRow, @firstVisibleScreenColumn, - @clipboard, @viewRegistry, @grammarRegistry, @project, @assert, @applicationDelegate + @clipboard, @grammarRegistry, @project, @assert, @applicationDelegate }) newEditor diff --git a/src/workspace.coffee b/src/workspace.coffee index 9a52dc937..c6ab13faf 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -570,7 +570,7 @@ class Workspace extends Model # Returns a {TextEditor}. buildTextEditor: (params) -> params = _.extend({ - @config, @clipboard, @viewRegistry, @grammarRegistry, + @config, @packageManager, @clipboard, @grammarRegistry, @project, @assert, @applicationDelegate }, params) new TextEditor(params)