Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
e0005aa2
Commit
e0005aa2
authored
Jan 03, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jump out
parent
4fb58291
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
1 deletion
+34
-1
traceManager.js
src/trace/traceManager.js
+4
-0
traceStepManager.js
src/trace/traceStepManager.js
+11
-0
ButtonNavigator.js
src/ui/ButtonNavigator.js
+7
-1
StepManager.js
src/ui/StepManager.js
+12
-0
No files found.
src/trace/traceManager.js
View file @
e0005aa2
...
@@ -271,6 +271,10 @@ TraceManager.prototype.findNextCall = function (currentStep) {
...
@@ -271,6 +271,10 @@ TraceManager.prototype.findNextCall = function (currentStep) {
return
this
.
traceStepManager
.
findNextCall
(
currentStep
)
return
this
.
traceStepManager
.
findNextCall
(
currentStep
)
}
}
TraceManager
.
prototype
.
findStepOut
=
function
(
currentStep
)
{
return
this
.
traceStepManager
.
findStepOut
(
currentStep
)
}
// util
// util
TraceManager
.
prototype
.
checkRequestedStep
=
function
(
stepIndex
)
{
TraceManager
.
prototype
.
checkRequestedStep
=
function
(
stepIndex
)
{
if
(
!
this
.
trace
)
{
if
(
!
this
.
trace
)
{
...
...
src/trace/traceStepManager.js
View file @
e0005aa2
...
@@ -43,4 +43,15 @@ TraceStepManager.prototype.findNextCall = function (currentStep) {
...
@@ -43,4 +43,15 @@ TraceStepManager.prototype.findNextCall = function (currentStep) {
}
}
}
}
TraceStepManager
.
prototype
.
findStepOut
=
function
(
currentStep
)
{
var
callChanges
=
this
.
traceAnalyser
.
traceCache
.
callChanges
var
stepIndex
=
util
.
findLowerBound
(
currentStep
,
callChanges
)
var
call
=
this
.
traceAnalyser
.
traceCache
.
calls
[
callChanges
[
stepIndex
]]
if
(
call
&&
call
.
return
)
{
return
call
.
return
}
else
{
return
currentStep
}
}
module
.
exports
=
TraceStepManager
module
.
exports
=
TraceStepManager
src/ui/ButtonNavigator.js
View file @
e0005aa2
...
@@ -11,6 +11,7 @@ function ButtonNavigator (_traceManager) {
...
@@ -11,6 +11,7 @@ function ButtonNavigator (_traceManager) {
this
.
intoForwardDisabled
=
true
this
.
intoForwardDisabled
=
true
this
.
overForwardDisabled
=
true
this
.
overForwardDisabled
=
true
this
.
nextCallDisabled
=
true
this
.
nextCallDisabled
=
true
this
.
jumpOutDisabled
=
true
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
...
@@ -29,9 +30,11 @@ ButtonNavigator.prototype.render = function () {
...
@@ -29,9 +30,11 @@ ButtonNavigator.prototype.render = function () {
<button id='intoforward' title='step into forward' class='fa fa-angle-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'stepIntoForward'
)
}
} disabled=
${
this
.
intoForwardDisabled
}
>
<button id='intoforward' title='step into forward' class='fa fa-angle-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'stepIntoForward'
)
}
} disabled=
${
this
.
intoForwardDisabled
}
>
</button>
</button>
<button id='overforward' title='step over forward' class='fa fa-angle-double-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'stepOverForward'
)
}
} disabled=
${
this
.
overForwardDisabled
}
>
<button id='overforward' title='step over forward' class='fa fa-angle-double-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'stepOverForward'
)
}
} disabled=
${
this
.
overForwardDisabled
}
>
</button>
</button>
<button id='nextcall' title='step next call' class='fa fa-chevron-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'jumpNextCall'
)
}
} disabled=
${
this
.
nextCallDisabled
}
>
<button id='nextcall' title='step next call' class='fa fa-chevron-right' style=
${
ui
.
formatCss
(
style
.
button
)}
onclick=
${
function
()
{
self
.
event
.
trigger
(
'jumpNextCall'
)
}
} disabled=
${
this
.
nextCallDisabled
}
>
</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>
</div>`
</div>`
if
(
!
this
.
view
)
{
if
(
!
this
.
view
)
{
this
.
view
=
view
this
.
view
=
view
...
@@ -45,11 +48,13 @@ ButtonNavigator.prototype.reset = function () {
...
@@ -45,11 +48,13 @@ ButtonNavigator.prototype.reset = function () {
this
.
intoForwardDisabled
=
true
this
.
intoForwardDisabled
=
true
this
.
overForwardDisabled
=
true
this
.
overForwardDisabled
=
true
this
.
nextCallDisabled
=
true
this
.
nextCallDisabled
=
true
this
.
jumpOutDisabled
=
true
}
}
ButtonNavigator
.
prototype
.
stepChanged
=
function
(
step
)
{
ButtonNavigator
.
prototype
.
stepChanged
=
function
(
step
)
{
this
.
intoBackDisabled
=
step
<=
0
this
.
intoBackDisabled
=
step
<=
0
this
.
overBackDisabled
=
step
<=
0
this
.
overBackDisabled
=
step
<=
0
this
.
jumpOutDisabled
=
step
<=
0
if
(
!
this
.
traceManager
)
{
if
(
!
this
.
traceManager
)
{
this
.
intoForwardDisabled
=
true
this
.
intoForwardDisabled
=
true
this
.
overForwardDisabled
=
true
this
.
overForwardDisabled
=
true
...
@@ -77,6 +82,7 @@ ButtonNavigator.prototype.updateAll = function () {
...
@@ -77,6 +82,7 @@ ButtonNavigator.prototype.updateAll = function () {
this
.
updateDisabled
(
'overforward'
,
this
.
overForwardDisabled
)
this
.
updateDisabled
(
'overforward'
,
this
.
overForwardDisabled
)
this
.
updateDisabled
(
'intoforward'
,
this
.
intoForwardDisabled
)
this
.
updateDisabled
(
'intoforward'
,
this
.
intoForwardDisabled
)
this
.
updateDisabled
(
'nextcall'
,
this
.
nextCallDisabled
)
this
.
updateDisabled
(
'nextcall'
,
this
.
nextCallDisabled
)
this
.
updateDisabled
(
'jumpout'
,
this
.
jumpOutDisabled
)
}
}
ButtonNavigator
.
prototype
.
updateDisabled
=
function
(
id
,
disabled
)
{
ButtonNavigator
.
prototype
.
updateDisabled
=
function
(
id
,
disabled
)
{
...
...
src/ui/StepManager.js
View file @
e0005aa2
...
@@ -42,6 +42,9 @@ function StepManager (_parent, _traceManager) {
...
@@ -42,6 +42,9 @@ function StepManager (_parent, _traceManager) {
this
.
buttonNavigator
.
event
.
register
(
'jumpNextCall'
,
this
,
function
()
{
this
.
buttonNavigator
.
event
.
register
(
'jumpNextCall'
,
this
,
function
()
{
self
.
jumpNextCall
()
self
.
jumpNextCall
()
})
})
this
.
buttonNavigator
.
event
.
register
(
'jumpOut'
,
this
,
function
()
{
self
.
jumpOut
()
})
}
}
StepManager
.
prototype
.
render
=
function
()
{
StepManager
.
prototype
.
render
=
function
()
{
...
@@ -126,6 +129,15 @@ StepManager.prototype.jumpNextCall = function () {
...
@@ -126,6 +129,15 @@ StepManager.prototype.jumpNextCall = function () {
this
.
changeState
(
step
)
this
.
changeState
(
step
)
}
}
StepManager
.
prototype
.
jumpOut
=
function
()
{
if
(
!
this
.
traceManager
.
isLoaded
())
{
return
}
var
step
=
this
.
traceManager
.
findStepOut
(
this
.
currentStepIndex
)
this
.
slider
.
setValue
(
step
)
this
.
changeState
(
step
)
}
StepManager
.
prototype
.
changeState
=
function
(
step
)
{
StepManager
.
prototype
.
changeState
=
function
(
step
)
{
this
.
currentStepIndex
=
step
this
.
currentStepIndex
=
step
this
.
buttonNavigator
.
stepChanged
(
step
)
this
.
buttonNavigator
.
stepChanged
(
step
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment