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
42fafe85
Unverified
Commit
42fafe85
authored
May 28, 2020
by
yann300
Committed by
GitHub
May 28, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2858 from ethereum/SHdouble
use SourceHighlighters in StaticAnalisys and remove multiple highlight
parents
b6c4a4e6
026443f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
SourceHighlighters.js
src/app/editor/SourceHighlighters.js
+9
-2
staticAnalysisView.js
src/app/tabs/staticanalysis/staticAnalysisView.js
+3
-3
No files found.
src/app/editor/SourceHighlighters.js
View file @
42fafe85
...
@@ -14,8 +14,15 @@ class SourceHighlighters {
...
@@ -14,8 +14,15 @@ class SourceHighlighters {
try
{
try
{
if
(
!
this
.
highlighters
[
from
])
this
.
highlighters
[
from
]
=
[]
if
(
!
this
.
highlighters
[
from
])
this
.
highlighters
[
from
]
=
[]
const
sourceHighlight
=
new
SourceHighlighter
()
const
sourceHighlight
=
new
SourceHighlighter
()
sourceHighlight
.
currentSourceLocationFromfileName
(
position
,
filePath
,
hexColor
)
if
(
this
.
highlighters
[
from
].
push
(
sourceHighlight
)
!
this
.
highlighters
[
from
].
length
||
(
this
.
highlighters
[
from
].
length
&&
!
this
.
highlighters
[
from
].
find
((
el
)
=>
{
return
el
.
source
===
filePath
&&
el
.
position
===
position
}))
)
{
sourceHighlight
.
currentSourceLocationFromfileName
(
position
,
filePath
,
hexColor
)
this
.
highlighters
[
from
].
push
(
sourceHighlight
)
}
}
catch
(
e
)
{
}
catch
(
e
)
{
throw
e
throw
e
}
}
...
...
src/app/tabs/staticanalysis/staticAnalysisView.js
View file @
42fafe85
...
@@ -108,9 +108,9 @@ staticAnalysisView.prototype.run = function () {
...
@@ -108,9 +108,9 @@ staticAnalysisView.prototype.run = function () {
if
(
!
this
.
view
)
{
if
(
!
this
.
view
)
{
return
return
}
}
const
highlightLocation
=
(
location
,
fileName
)
=>
{
const
highlightLocation
=
async
(
location
,
fileName
)
=>
{
// await this.analysisModule.call('editor', 'highlight', location, fileName) @todo(#2834) use this after fixing the issue
await
this
.
analysisModule
.
call
(
'editor'
,
'discardHighlight'
)
this
.
sourceHighlighter
.
currentSourceLocationFromfileName
(
location
,
fileName
)
await
this
.
analysisModule
.
call
(
'editor'
,
'highlight'
,
location
,
fileName
)
}
}
const
selected
=
this
.
selectedModules
()
const
selected
=
this
.
selectedModules
()
const
warningContainer
=
$
(
'#staticanalysisresult'
)
const
warningContainer
=
$
(
'#staticanalysisresult'
)
...
...
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