function getCurrentDocument() {
        var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE);

        if (file) {
            return getOpenDocumentForPath(file.fullPath);
        }

        return null;
    }
function getCurrentDocument() {
        var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE);

        if (file) {
            return getOpenDocumentForPath(file.fullPath);
        }

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