code: function getCurrentDocument() {
          var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE);
  
          if (file) {
              return getOpenDocumentForPath(file.fullPath);
          }
  
          return null;
      }
docs: Returns the Document that is currently open in the editor UI. May be null.
  @return {?Document}