Commit c99564d9 authored by yann300's avatar yann300

rename play => jumptonextbreakpoint

parent 376e3acb
...@@ -26,7 +26,7 @@ class breakpointManager { ...@@ -26,7 +26,7 @@ class breakpointManager {
* start looking for the next breakpoint * start looking for the next breakpoint
* *
*/ */
async play (defaultToEnd) { async jumpNextBreakpoint (defaultToEnd) {
this.isPlaying = true this.isPlaying = true
var sourceLocation var sourceLocation
for (var currentStep = this.debugger.currentStepIndex + 1; currentStep < this.debugger.traceManager.trace.length; currentStep++) { for (var currentStep = this.debugger.currentStepIndex + 1; currentStep < this.debugger.traceManager.trace.length; currentStep++) {
......
...@@ -11,7 +11,7 @@ function ButtonNavigator (_parent, _traceManager) { ...@@ -11,7 +11,7 @@ function ButtonNavigator (_parent, _traceManager) {
this.intoForwardDisabled = true this.intoForwardDisabled = true
this.overForwardDisabled = true this.overForwardDisabled = true
this.jumpOutDisabled = true this.jumpOutDisabled = true
this.playDisabled = true this.jumpNextBreakpointDisabled = true
this.traceManager = _traceManager this.traceManager = _traceManager
this.currentCall = null this.currentCall = null
...@@ -69,7 +69,7 @@ ButtonNavigator.prototype.render = function () { ...@@ -69,7 +69,7 @@ ButtonNavigator.prototype.render = function () {
</button> </button>
<button id='jumpout' title='jump out' class='fa fa-share' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpOut') }} disabled=${this.jumpOutDisabled} > <button id='jumpout' title='jump out' class='fa fa-share' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpOut') }} disabled=${this.jumpOutDisabled} >
</button> </button>
<button id='play' title='jump to the next breakpoint' class='fa fa-step-forward' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('play') }} disabled=${this.playDisabled} > <button id='jumpnextbreakpoint' title='jump to the next breakpoint' class='fa fa-step-forward' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpNextBreakpoint') }} disabled=${this.jumpNextBreakpointDisabled} >
</button> </button>
<div id='reverted' style="display:none"> <div id='reverted' style="display:none">
<button id='jumptoexception' title='jump to exception' class='fa fa-exclamation-triangle' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpToException', [self.revertionPoint]) }} disabled=${this.jumpOutDisabled} > <button id='jumptoexception' title='jump to exception' class='fa fa-exclamation-triangle' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpToException', [self.revertionPoint]) }} disabled=${this.jumpOutDisabled} >
...@@ -91,6 +91,7 @@ ButtonNavigator.prototype.reset = function () { ...@@ -91,6 +91,7 @@ ButtonNavigator.prototype.reset = function () {
this.intoForwardDisabled = true this.intoForwardDisabled = true
this.overForwardDisabled = true this.overForwardDisabled = true
this.jumpOutDisabled = true this.jumpOutDisabled = true
this.jumpNextBreakpointDisabled = true
resetWarning(this) resetWarning(this)
} }
...@@ -107,7 +108,7 @@ ButtonNavigator.prototype.stepChanged = function (step) { ...@@ -107,7 +108,7 @@ ButtonNavigator.prototype.stepChanged = function (step) {
self.reset() self.reset()
console.log(error) console.log(error)
} else { } else {
self.playDisabled = step >= length - 1 self.jumpNextBreakpointDisabled = step >= length - 1
self.intoForwardDisabled = step >= length - 1 self.intoForwardDisabled = step >= length - 1
self.overForwardDisabled = step >= length - 1 self.overForwardDisabled = step >= length - 1
var stepOut = self.traceManager.findStepOut(step) var stepOut = self.traceManager.findStepOut(step)
...@@ -126,7 +127,7 @@ ButtonNavigator.prototype.updateAll = function () { ...@@ -126,7 +127,7 @@ ButtonNavigator.prototype.updateAll = function () {
this.updateDisabled('intoforward', this.intoForwardDisabled) this.updateDisabled('intoforward', this.intoForwardDisabled)
this.updateDisabled('jumpout', this.jumpOutDisabled) this.updateDisabled('jumpout', this.jumpOutDisabled)
this.updateDisabled('jumptoexception', this.jumpOutDisabled) this.updateDisabled('jumptoexception', this.jumpOutDisabled)
this.updateDisabled('play', this.playDisabled) this.updateDisabled('jumpnextbreakpoint', this.jumpNextBreakpointDisabled)
} }
ButtonNavigator.prototype.updateDisabled = function (id, disabled) { ButtonNavigator.prototype.updateDisabled = function (id, disabled) {
......
...@@ -146,7 +146,7 @@ Ethdebugger.prototype.startDebugging = function (blockNumber, txIndex, tx) { ...@@ -146,7 +146,7 @@ Ethdebugger.prototype.startDebugging = function (blockNumber, txIndex, tx) {
yo.update(self.view, self.render()) yo.update(self.view, self.render())
self.event.trigger('newTraceLoaded', [self.traceManager.trace]) self.event.trigger('newTraceLoaded', [self.traceManager.trace])
if (self.breakpointManager && self.breakpointManager.hasBreakpoint()) { if (self.breakpointManager && self.breakpointManager.hasBreakpoint()) {
self.breakpointManager.play(false) self.breakpointManager.jumpNextBreakpoint(false)
} }
} else { } else {
self.statusMessage = error ? error.message : 'Trace not loaded' self.statusMessage = error ? error.message : 'Trace not loaded'
......
...@@ -60,8 +60,8 @@ function StepManager (_parent, _traceManager) { ...@@ -60,8 +60,8 @@ function StepManager (_parent, _traceManager) {
this.buttonNavigator.event.register('jumpToException', this, function (exceptionIndex) { this.buttonNavigator.event.register('jumpToException', this, function (exceptionIndex) {
self.jumpTo(exceptionIndex) self.jumpTo(exceptionIndex)
}) })
this.buttonNavigator.event.register('play', (exceptionIndex) => { this.buttonNavigator.event.register('jumpNextBreakpoint', (exceptionIndex) => {
self.parent.breakpointManager.play(true) self.parent.breakpointManager.jumpNextBreakpoint(true)
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment