       @findView?.detach()
       @projectFindView?.detach()
 
-  createProjectFindView: (projectViewState, resultsModelState) ->
-    @resultsModel ?= new ResultsModel(resultsModelState)
-    @projectFindView ?= new ProjectFindView(@resultsModel, projectViewState)
+  createProjectFindView: ->
+    @resultsModel ?= new ResultsModel(@resultsModelState)
+    @projectFindView ?= new ProjectFindView(@resultsModel, @projectViewState)
 
     # HACK: Soooo, we need to get the model to the pane view whenever it is
     # created. Creation could come from the opener below, or, more problematic,

    atom.workspaceView.command 'find-and-replace:use-selection-as-find-pattern', =>
      return if @projectFindView?.isOnDom() or @findView?.isOnDom()

      @createFindView(viewState)
      @projectFindView?.detach()
      @findView.showFind()

    atom.workspaceView.command 'find-and-replace:show', =>
      @createFindView(viewState)
      @projectFindView?.detach()
      @findView.showFind()

    atom.workspaceView.command 'find-and-replace:show-replace', =>
      @createFindView(viewState)
      @projectFindView?.detach()
      @findView.showReplace()


  configDefaults:
    openProjectFindResultsInRightPane: false

  activate: ({@viewState, @projectViewState, @resultsModelState}={}) ->
    atom.project.registerOpener (filePath) =>
      new ResultsPaneView() if filePath is ResultsPaneView.URI

    atom.workspaceView.command 'project-find:show', =>
      @createProjectFindView()
      @findView?.detach()
      @projectFindView.attach()

    atom.workspaceView.command 'project-find:show-in-current-directory', (e) =>
      @createProjectFindView()
      @findView?.detach()
      @projectFindView.attach()
      @projectFindView.findInCurrentlySelectedDirectory($(e.target))
