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
bf278f68
Commit
bf278f68
authored
Sep 24, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use contextuallistener
parent
281bee23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
browser-solidity.css
assets/css/browser-solidity.css
+7
-0
app.js
src/app.js
+20
-0
No files found.
assets/css/browser-solidity.css
View file @
bf278f68
...
...
@@ -290,6 +290,13 @@ input[type="file"] {
display
:
none
;
}
.highlightcall
{
position
:
absolute
;
z-index
:
20
;
background-color
:
lightgrey
;
opacity
:
0.5
}
.highlightcode
{
position
:
absolute
;
z-index
:
20
;
...
...
src/app.js
View file @
bf278f68
...
...
@@ -34,6 +34,7 @@ var TxLogger = require('./app/execution/txLogger')
var
EventsDecoder
=
require
(
'./app/execution/eventsDecoder'
)
var
handleImports
=
require
(
'./app/compiler/compiler-imports'
)
var
FileManager
=
require
(
'./app/files/fileManager'
)
var
ContextualListener
=
require
(
'./app/editor/contextualListener'
)
var
styleGuide
=
remix
.
ui
.
styleGuide
var
styles
=
styleGuide
()
...
...
@@ -385,6 +386,25 @@ function run () {
})
var
offsetToLineColumnConverter
=
new
OffsetToLineColumnConverter
(
compiler
.
event
)
// ---------------- ContextualListener -----------------------
this
.
_components
.
contextualListener
=
new
ContextualListener
({
getCursorPosition
:
()
=>
{
return
this
.
_components
.
editor
.
getCursorPosition
()
},
getCompilationResult
:
()
=>
{
return
compiler
.
lastCompilationResult
},
warnFoundCall
:
(
position
)
=>
{
position
=
offsetToLineColumnConverter
.
offsetToLineColumn
(
position
,
position
.
file
,
compiler
.
lastCompilationResult
)
return
editor
.
addMarker
(
position
,
config
.
get
(
'currentFile'
),
'highlightcall'
)
},
stopFoundCall
:
(
event
)
=>
{
editor
.
removeMarker
(
event
.
eventId
,
event
.
fileTarget
)
}
},
{
compiler
:
compiler
.
event
})
// ----------------- Renderer -----------------
var
rendererAPI
=
{
error
:
(
file
,
error
)
=>
{
...
...
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