     @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()
 


    rootView.command 'find-and-replace:use-selection-as-find-pattern', @setSelectionAsFindPattern

  attach: ->
    if @hasParent()
      el = @lastFocusedElement or @findEditor


      @ul outlet: 'errorMessages', class: 'error-messages block'
      @ul outlet: 'infoMessages', class: 'info-messages block'
      @div outlet: 'replacmentInfoBlock', class: 'block', =>
        @progress outlet: 'replacementProgress', class: 'inline-block'
        @span outlet: 'replacmentInfo', class: 'inline-block', 'Replaced 2 files of 10 files'

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