src/document/DocumentCommandHandlers.js
function handleFileAddToWorkingSetAndOpen(commandData) {
        return handleFileOpen(commandData).done(function (file) {
            var paneId = (commandData && commandData.paneId) || MainViewManager.ACTIVE_PANE;
            MainViewManager.addToWorkingSet(paneId, file, commandData.index, commandData.forceRedraw);
            HealthLogger.fileOpened(file.fullPath, true);
        });
    }
function handleFileAddToWorkingSetAndOpen(commandData) {
        return handleFileOpen(commandData).done(function (file) {
            var paneId = (commandData && commandData.paneId) || MainViewManager.ACTIVE_PANE;
            MainViewManager.addToWorkingSet(paneId, file, commandData.index, commandData.forceRedraw);
            HealthLogger.fileOpened(file.fullPath, true);
        });
    }
function handleFileAddToWorkingSetAndOpen ( commandData ) { return handleFileOpen ( commandData ) . done ( function ( file ) { var paneId = ( commandData && commandData . paneId ) || MainViewManager . ACTIVE_PANE ; MainViewManager . addToWorkingSet ( paneId , file , commandData . index , commandData . forceRedraw ) ; HealthLogger . fileOpened ( file . fullPath , true ) ; } ) ; }
Opens the given file, makes it the current file, AND adds it to the workingset
@param {!PaneCommandData} commandData - record with the following properties:
fullPath: File to open;
index: optional index to position in workingset (defaults to last);
silent: optional flag to suppress error messages;
forceRedraw: flag to force the working set view redraw;
paneId: optional PaneId (defaults to active pane)
@return {$.Promise} a jQuery promise that will be resolved with a @type {File}
Opens the given file makes it the current file AND adds it to the workingset