(this.$editorWrapper = c)}
>
{this.renderSearchBar()}
{this.renderItems()}
);
}
}
Editor.contextTypes = {
shortcuts: PropTypes.object
};
const mapStateToProps = state => {
const selectedSourceWithContent = getSelectedSourceWithContent(state);
return {
cx: getThreadContext(state),
selectedLocation: getSelectedLocation(state),
selectedSourceWithContent,
searchOn: getActiveSearch(state) === "file",
conditionalPanelLocation: getConditionalPanelLocation(state),
symbols: getSymbols(
state,
selectedSourceWithContent ? selectedSourceWithContent.source : null
),
isPaused: getIsPaused(state, getCurrentThread(state)),
skipPausing: getSkipPausing(state)
};
};
const mapDispatchToProps = dispatch => ({
...bindActionCreators(
{
openConditionalPanel: actions.openConditionalPanel,
closeConditionalPanel: actions.closeConditionalPanel,
continueToHere: actions.continueToHere,
toggleBreakpointAtLine: actions.toggleBreakpointAtLine,
addBreakpointAtLine: actions.addBreakpointAtLine,
jumpToMappedLocation: actions.jumpToMappedLocation,
traverseResults: actions.traverseResults,
updateViewport: actions.updateViewport,
closeTab: actions.closeTab
},
dispatch
),
breakpointActions: breakpointItemActions(dispatch),
editorActions: editorItemActions(dispatch)
});
export default connect(
mapStateToProps,
mapDispatchToProps
)(Editor);