code: function _findPaneForDocument(document) {
          // First check for an editor view of the document
          var pane = _getPaneFromElement($(document._masterEditor.$el.parent().parent()));
  
          if (!pane) {
              // No view of the document, it may be in a working set and not yet opened
              var info = findInAllWorkingSets(document.file.fullPath).shift();
              if (info) {
                  pane = _panes[info.paneId];
              }
          }
  
          return pane;
      }
docs: Finds which pane a document belongs to
  @param {!Document} document - the document to locate
  @return {?Pane} the pane where the document lives or NULL if it isn't in a pane
  @private