     if editor
       pattern = editor.activeEditSession.getSelectedText()
       @findEditor.setText(pattern)
-
-  replaceAll: ->
-    @clearMessages()
-
-    pattern = @findEditor.getText()
-    replacementText = @replaceEditor.getText()
-    promise = @model.replace(pattern, replacementText, @model.getPaths())
-
-    if @model.getPathCount()
-      @model.once 'finished-replacing', ({pathsReplaced, replacements}) =>
-        @addInfoMessage("Replaced #{_.pluralize(replacements, 'result')} in #{_.pluralize(pathsReplaced, 'file')}")
-    else
-      shell.beep()
-      @addInfoMessage("Nothing replaced")
-
-    promise


      @ul outlet: 'errorMessages', class: 'error-messages block'
      @ul outlet: 'infoMessages', class: 'info-messages block'

      @div class: 'find-container block', =>
        @label class: 'text-subtle', 'Find'

    @showResultPane()
    @model.search(@findEditor.getText(), paths)

  replaceAll: ->
    @clearMessages()
    pattern = @findEditor.getText()
    replacementText = @replaceEditor.getText()
    @model.replace(pattern, replacementText, @model.getPaths())

  showResultPane: ->
    options = null
    options = {split: 'right'} if config.get('find-and-replace.openProjectFindResultsInRightPane')
    rootView.openSingletonSync(ResultsPaneView.URI, options)

  clearMessages: ->
    # @replacmentInfoBlock.hide()
    @errorMessages.hide().empty()
    @infoMessages.hide().empty()

