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
8f6ad3f4
Commit
8f6ad3f4
authored
Feb 09, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use filename instead of index
parent
2e4e965f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
breakpointManager.js
src/code/breakpointManager.js
+8
-7
solidityProxy.js
src/solidity/solidityProxy.js
+10
-0
No files found.
src/code/breakpointManager.js
View file @
8f6ad3f4
...
@@ -113,8 +113,9 @@ class BreakpointManager {
...
@@ -113,8 +113,9 @@ class BreakpointManager {
* @return {Bool} return true if the given @arg fileIndex @arg line refers to a breakpoint
* @return {Bool} return true if the given @arg fileIndex @arg line refers to a breakpoint
*/
*/
hasBreakpointAtLine
(
fileIndex
,
line
)
{
hasBreakpointAtLine
(
fileIndex
,
line
)
{
if
(
this
.
breakpoints
[
fileIndex
])
{
var
filename
=
this
.
debugger
.
solidityProxy
.
fileNameFromIndex
(
fileIndex
)
var
sources
=
this
.
breakpoints
[
fileIndex
]
if
(
filename
&&
this
.
breakpoints
[
filename
])
{
var
sources
=
this
.
breakpoints
[
filename
]
for
(
var
k
in
sources
)
{
for
(
var
k
in
sources
)
{
var
source
=
sources
[
k
]
var
source
=
sources
[
k
]
if
(
line
===
source
.
row
)
{
if
(
line
===
source
.
row
)
{
...
@@ -145,10 +146,10 @@ class BreakpointManager {
...
@@ -145,10 +146,10 @@ class BreakpointManager {
* @param {Object} sourceLocation - position of the breakpoint { file: '<file index>', row: '<line number' }
* @param {Object} sourceLocation - position of the breakpoint { file: '<file index>', row: '<line number' }
*/
*/
add
(
sourceLocation
)
{
add
(
sourceLocation
)
{
if
(
!
this
.
breakpoints
[
sourceLocation
.
file
])
{
if
(
!
this
.
breakpoints
[
sourceLocation
.
file
Name
])
{
this
.
breakpoints
[
sourceLocation
.
file
]
=
[]
this
.
breakpoints
[
sourceLocation
.
file
Name
]
=
[]
}
}
this
.
breakpoints
[
sourceLocation
.
file
].
push
(
sourceLocation
)
this
.
breakpoints
[
sourceLocation
.
file
Name
].
push
(
sourceLocation
)
this
.
event
.
trigger
(
'breakpointAdded'
,
[
sourceLocation
])
this
.
event
.
trigger
(
'breakpointAdded'
,
[
sourceLocation
])
}
}
...
@@ -158,8 +159,8 @@ class BreakpointManager {
...
@@ -158,8 +159,8 @@ class BreakpointManager {
* @param {Object} sourceLocation - position of the breakpoint { file: '<file index>', row: '<line number' }
* @param {Object} sourceLocation - position of the breakpoint { file: '<file index>', row: '<line number' }
*/
*/
remove
(
sourceLocation
)
{
remove
(
sourceLocation
)
{
if
(
this
.
breakpoints
[
sourceLocation
.
file
])
{
if
(
this
.
breakpoints
[
sourceLocation
.
file
Name
])
{
var
sources
=
this
.
breakpoints
[
sourceLocation
.
file
]
var
sources
=
this
.
breakpoints
[
sourceLocation
.
file
Name
]
for
(
var
k
in
sources
)
{
for
(
var
k
in
sources
)
{
var
source
=
sources
[
k
]
var
source
=
sources
[
k
]
if
(
sourceLocation
.
row
===
source
.
row
)
{
if
(
sourceLocation
.
row
===
source
.
row
)
{
...
...
src/solidity/solidityProxy.js
View file @
8f6ad3f4
...
@@ -120,6 +120,16 @@ class SolidityProxy {
...
@@ -120,6 +120,16 @@ class SolidityProxy {
return
null
return
null
}
}
}
}
/**
* get the filename refering to the index from the compilation result
*
* @param {Int} index - index of the filename
* @return {String} - filename
*/
fileNameFromIndex
(
index
)
{
return
this
.
sourceList
[
index
]
}
}
}
function
contractNameFromCode
(
contracts
,
code
,
address
)
{
function
contractNameFromCode
(
contracts
,
code
,
address
)
{
...
...
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