       @importData data, callback
 
   openSharedContent: (id) ->
+    @_event 'willOpenFile', {op: "openSharedContent"}
     @state.shareProvider?.loadSharedContent id, (err, content, metadata) =>
       return @alert(err, => @ready()) if err
       @_fileOpened content, metadata, {overwritable: false, openedContent: content.clone()}


  openUrlFile: (url) ->
    @urlProvider.openFileFromUrl url, (err, content, metadata) =>
      return @alert(err, => @ready()) if err
      @_fileOpened content, metadata, {openedContent: content.clone()}, @_getHashParams metadata



  openFile: (metadata, callback = null) ->
    if metadata?.provider?.can 'load', metadata
      @_event 'willOpenFile', {op: "openFile"}
      metadata.provider.load metadata, (err, content) =>
        return @alert(err, => @ready()) if err
        # should wait to close current file until client signals open is complete
