src/extensions/default/NavigationAndHistory/main.js
function _openEditorForContext(contextData) {
        // Open the file in the current active pane to prevent unwanted scenarios if we are not in split view, fallback
        // to the persisted paneId when specified and we are in split view or unable to determine the paneid
        var activePaneId = MainViewManager.getActivePaneId(),
            targetPaneId = contextData.paneId; // Assume we are going to use the last associated paneID

        // Detect if we are not in split mode
        if (MainViewManager.getPaneCount() === 1) {
            // Override the targetPaneId with activePaneId as we are not yet in split mode
            targetPaneId = activePaneId;
        }

        // If hide of MROF list is a context parameter, hide the MROF list on successful file open
        if (contextData.hideOnOpenFile) {
            _hideMROFList();
        }

        return CommandManager
            .execute(Commands.FILE_OPEN,
                    {   fullPath: contextData.path,
                        paneId: targetPaneId
                    }
                )
            .done(function () {
                if (contextData.cursor) {
                    activeEditor = EditorManager.getActiveEditor();
                    activeEditor.setCursorPos(contextData.cursor);
                    activeEditor.centerOnCursor();
                }
            });
    }
function _openEditorForContext(contextData) {
        // Open the file in the current active pane to prevent unwanted scenarios if we are not in split view, fallback
        // to the persisted paneId when specified and we are in split view or unable to determine the paneid
        var activePaneId = MainViewManager.getActivePaneId(),
            targetPaneId = contextData.paneId; // Assume we are going to use the last associated paneID

        // Detect if we are not in split mode
        if (MainViewManager.getPaneCount() === 1) {
            // Override the targetPaneId with activePaneId as we are not yet in split mode
            targetPaneId = activePaneId;
        }

        // If hide of MROF list is a context parameter, hide the MROF list on successful file open
        if (contextData.hideOnOpenFile) {
            _hideMROFList();
        }

        return CommandManager
            .execute(Commands.FILE_OPEN,
                    {   fullPath: contextData.path,
                        paneId: targetPaneId
                    }
                )
            .done(function () {
                if (contextData.cursor) {
                    activeEditor = EditorManager.getActiveEditor();
                    activeEditor.setCursorPos(contextData.cursor);
                    activeEditor.centerOnCursor();
                }
            });
    }
function _openEditorForContext ( contextData ) { // Open the file in the current active pane to prevent unwanted scenarios if we are not in split view, fallback // to the persisted paneId when specified and we are in split view or unable to determine the paneid var activePaneId = MainViewManager . getActivePaneId ( ) , targetPaneId = contextData . paneId ; // Assume we are going to use the last associated paneID // Detect if we are not in split mode if ( MainViewManager . getPaneCount ( ) === 1 ) { // Override the targetPaneId with activePaneId as we are not yet in split mode targetPaneId = activePaneId ; } // If hide of MROF list is a context parameter, hide the MROF list on successful file open if ( contextData . hideOnOpenFile ) { _hideMROFList ( ) ; } return CommandManager . execute ( Commands . FILE_OPEN , { fullPath : contextData . path , paneId : targetPaneId } ) . done ( function ( ) { if ( contextData . cursor ) { activeEditor = EditorManager . getActiveEditor ( ) ; activeEditor . setCursorPos ( contextData . cursor ) ; activeEditor . centerOnCursor ( ) ; } } ) ; }
Opens a full editor for the given context
@private
@param {Object.<path, paneId, cursor>} contextData - wrapper to provide the information required to open a full editor
@return {$.Promise} - from the commandmanager
Opens a full editor for the given context