mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Don't need to pass view registry through anymore.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user