src/view/MainViewManager.js
function _createPaneIfNecessary(paneId) {
        var newPane;

        if (!_panes.hasOwnProperty(paneId)) {
            newPane = new Pane(paneId, _$el);
            _panes[paneId] = newPane;

            exports.trigger("paneCreate", newPane.id);

            newPane.$el.on("click.mainview dragover.mainview", function () {
                setActivePaneId(newPane.id);
            });

            newPane.on("viewListChange.mainview", function () {
                _updatePaneHeaders();
                exports.trigger("workingSetUpdate", newPane.id);
            });
            newPane.on("currentViewChange.mainview", function (e, newView, oldView) {
                _updatePaneHeaders();
                if (_activePaneId === newPane.id) {
                    exports.trigger("currentFileChange",
                                               newView && newView.getFile(),
                                               newPane.id, oldView && oldView.getFile(),
                                               newPane.id);
                }
            });
            newPane.on("viewDestroy.mainView", function (e, view) {
                _removeFileFromMRU(newPane.id, view.getFile());
            });
        }

        return newPane;
    }
function _createPaneIfNecessary(paneId) {
        var newPane;

        if (!_panes.hasOwnProperty(paneId)) {
            newPane = new Pane(paneId, _$el);
            _panes[paneId] = newPane;

            exports.trigger("paneCreate", newPane.id);

            newPane.$el.on("click.mainview dragover.mainview", function () {
                setActivePaneId(newPane.id);
            });

            newPane.on("viewListChange.mainview", function () {
                _updatePaneHeaders();
                exports.trigger("workingSetUpdate", newPane.id);
            });
            newPane.on("currentViewChange.mainview", function (e, newView, oldView) {
                _updatePaneHeaders();
                if (_activePaneId === newPane.id) {
                    exports.trigger("currentFileChange",
                                               newView && newView.getFile(),
                                               newPane.id, oldView && oldView.getFile(),
                                               newPane.id);
                }
            });
            newPane.on("viewDestroy.mainView", function (e, view) {
                _removeFileFromMRU(newPane.id, view.getFile());
            });
        }

        return newPane;
    }
function _createPaneIfNecessary ( paneId ) { var newPane ; if ( ! _panes . hasOwnProperty ( paneId ) ) { newPane = new Pane ( paneId , _$el ) ; _panes [ paneId ] = newPane ; exports . trigger ( "paneCreate" , newPane . id ) ; newPane . $el . on ( "click.mainview dragover.mainview" , function ( ) { setActivePaneId ( newPane . id ) ; } ) ; newPane . on ( "viewListChange.mainview" , function ( ) { _updatePaneHeaders ( ) ; exports . trigger ( "workingSetUpdate" , newPane . id ) ; } ) ; newPane . on ( "currentViewChange.mainview" , function ( e , newView , oldView ) { _updatePaneHeaders ( ) ; if ( _activePaneId === newPane . id ) { exports . trigger ( "currentFileChange" , newView && newView . getFile ( ) , newPane . id , oldView && oldView . getFile ( ) , newPane . id ) ; } } ) ; newPane . on ( "viewDestroy.mainView" , function ( e , view ) { _removeFileFromMRU ( newPane . id , view . getFile ( ) ) ; } ) ; } return newPane ; }
Creates a pane for paneId if one doesn't already exist
@param {!string} paneId - id of the pane to create
@private
@return {?Pane} - the pane object of the new pane, or undefined if no pane created
Creates a pane for paneId if one doesn t already exist