       type      : "mini"
       cssClass  : "editor #{style}"
       container : @parent
-      duration  : if details then 5000 else 2500
+      duration  : duration or if details then 5000 else 2500
       details   : details
       click     : ->
         if notification.getOptions().details


  viewAppended:->

    @appStorage.fetchStorage (storage)=>
      require ['ace/ace'], (ace)=>
        @editor = ace.edit "editor#{@getId()}"
        @prepareEditor()
        @utils.wait => @emit "ace.ready"
        @fetchContents (err, contents)=>
          @setContents contents if contents
          @editor.gotoLine 0

  prepareEditor:->



    file = @getData()
    unless /localfile:/.test file.path
      @notify "Loading...", null, null, 10000
      file.fetchContents callback
    else
      callback null, file.contents or ""
