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
ca426bc9
Commit
ca426bc9
authored
Mar 05, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure only solidity
parent
6c6401ff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
contextView.js
src/app/editor/contextView.js
+1
-1
contextualListener.js
src/app/editor/contextualListener.js
+4
-3
staticAnalysisView.js
src/app/staticanalysis/staticAnalysisView.js
+1
-0
No files found.
src/app/editor/contextView.js
View file @
ca426bc9
...
...
@@ -97,7 +97,7 @@ class ContextView {
}
}
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
if
(
lastCompilationResult
&&
lastCompilationResult
.
data
)
{
if
(
lastCompilationResult
&&
lastCompilationResult
.
languageversion
.
indexOf
(
'soljson'
)
===
0
&&
lastCompilationResult
.
data
)
{
const
lineColumn
=
this
.
_deps
.
offsetToLineColumnConverter
.
offsetToLineColumn
(
position
,
position
.
file
,
...
...
src/app/editor/contextualListener.js
View file @
ca426bc9
...
...
@@ -27,6 +27,7 @@ class ContextualListener {
this
.
_activeHighlights
=
[]
this
.
pluginManager
.
event
.
register
(
'sendCompilationResult'
,
(
file
,
source
,
languageVersion
,
data
)
=>
{
if
(
languageVersion
.
indexOf
(
'soljson'
)
!==
0
)
return
this
.
_stopHighlighting
()
this
.
_index
=
{
Declarations
:
{},
...
...
@@ -40,7 +41,7 @@ class ContextualListener {
this
.
sourceMappingDecoder
=
new
SourceMappingDecoder
()
this
.
astWalker
=
new
AstWalker
()
setInterval
(()
=>
{
if
(
this
.
_deps
.
compilersArtefacts
[
'__last'
])
{
if
(
this
.
_deps
.
compilersArtefacts
[
'__last'
]
&&
this
.
_deps
.
compilersArtefacts
[
'__last'
].
languageversion
.
indexOf
(
'soljson'
)
===
0
)
{
this
.
_highlightItems
(
this
.
editor
.
getCursorPosition
(),
this
.
_deps
.
compilersArtefacts
[
'__last'
],
this
.
_deps
.
config
.
get
(
'currentFile'
))
}
},
1000
)
...
...
@@ -105,14 +106,14 @@ class ContextualListener {
const
position
=
this
.
sourceMappingDecoder
.
decode
(
node
.
src
)
const
eventId
=
this
.
_highlightInternal
(
position
,
node
)
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
if
(
eventId
&&
lastCompilationResult
)
{
if
(
eventId
&&
lastCompilationResult
&&
lastCompilationResult
.
languageversion
.
indexOf
(
'soljson'
)
===
0
)
{
this
.
_activeHighlights
.
push
({
eventId
,
position
,
fileTarget
:
lastCompilationResult
.
getSourceName
(
position
.
file
),
nodeId
:
node
.
id
})
}
}
_highlightInternal
(
position
,
node
)
{
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
if
(
lastCompilationResult
)
{
if
(
lastCompilationResult
&&
lastCompilationResult
.
languageversion
.
indexOf
(
'soljson'
)
===
0
)
{
let
lineColumn
=
this
.
_deps
.
offsetToLineColumnConverter
.
offsetToLineColumn
(
position
,
position
.
file
,
lastCompilationResult
.
getSourceCode
().
sources
,
lastCompilationResult
.
getAsts
())
let
css
=
'highlightreference'
if
(
node
.
children
&&
node
.
children
.
length
)
{
...
...
src/app/staticanalysis/staticAnalysisView.js
View file @
ca426bc9
...
...
@@ -27,6 +27,7 @@ function staticAnalysisView (localRegistry) {
}
self
.
_deps
.
pluginManager
.
event
.
register
(
'sendCompilationResult'
,
(
file
,
source
,
languageVersion
,
data
)
=>
{
if
(
languageVersion
.
indexOf
(
'soljson'
)
!==
0
)
return
self
.
lastCompilationResult
=
null
self
.
lastCompilationSource
=
null
$
(
'#staticanalysisresult'
).
empty
()
...
...
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